home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 1.toast / pc / tool chest / macapp / ad lib 2.6.5 / install ad lib 2.6.5 / Ad Lib 2.6.5 / MacApp Extensions / UAdLibLink.cp < prev    next >
MacBinary  |  1997-07-25  |  14.5 KB  |  [TEXT/CWIE]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert MS-DOS Code Page Info (other/dosCodePage) ext Unsupported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Fri Jul 25 09:06:48 1997, modified Fri Jul 25 09:06:48 1997, creator 'CWIE', type ASCII, 14164 bytes "UAdLibLink.cp" , at 0x37d4 474 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[CWIE]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0d 55 41 64 4c 69 62 | 4c 69 6e 6b 2e 63 70 00 |..UAdLib|Link.cp.|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 43 57 49 | 45 01 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 37 54 00 | 00 01 da af fe 55 68 af |.....7T.|.....Uh.|
|00000060| fe 55 68 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.Uh.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 c7 99 00 00 |........|........|
|00000080| 2f 2f 09 55 41 64 4c 69 | 62 4c 69 6e 6b 2e 63 70 |//.UAdLi|bLink.cp|
|00000090| 0d 2f 2f 09 43 6f 70 79 | 72 69 67 68 74 20 a9 20 |.//.Copy|right . |
|000000a0| 31 39 39 33 2d 31 39 39 | 35 20 4e 69 63 6b 20 4e |1993-199|5 Nick N|
|000000b0| 61 6c 6c 69 63 6b 2e 20 | 20 41 6c 6c 20 72 69 67 |allick. | All rig|
|000000c0| 68 74 73 20 72 65 73 65 | 72 76 65 64 2e 0d 2f 2f |hts rese|rved..//|
|000000d0| 0d 2f 2f 0d 2f 2f 09 43 | 68 61 6e 67 65 73 3a 0d |.//.//.C|hanges:.|
|000000e0| 2f 2f 0d 2f 2f 09 09 a5 | 09 41 64 64 20 4d 61 63 |//.//...|.Add Mac|
|000000f0| 41 70 70 20 33 2e 33 20 | 63 6f 6d 70 61 74 69 62 |App 3.3 |compatib|
|00000100| 69 6c 69 74 79 2e 0d 2f | 2f 09 09 a5 09 41 64 64 |ility../|/....Add|
|00000110| 20 4d 61 63 41 70 70 20 | 33 2e 31 20 63 6f 6d 70 | MacApp |3.1 comp|
|00000120| 61 74 69 62 69 6c 69 74 | 79 2e 0d 2f 2f 0d 0d 23 |atibilit|y..//..#|
|00000130| 69 66 6e 64 65 66 20 5f | 5f 52 45 53 4f 55 52 43 |ifndef _|_RESOURC|
|00000140| 45 53 5f 5f 0d 23 69 6e | 63 6c 75 64 65 20 3c 52 |ES__.#in|clude <R|
|00000150| 65 73 6f 75 72 63 65 73 | 2e 68 3e 0d 23 65 6e 64 |esources|.h>.#end|
|00000160| 69 66 0d 0d 23 69 66 6e | 64 65 66 20 5f 5f 4d 61 |if..#ifn|def __Ma|
|00000170| 63 41 70 70 43 6f 6d 70 | 61 74 69 62 69 6c 69 74 |cAppComp|atibilit|
|00000180| 79 5f 5f 0d 23 69 6e 63 | 6c 75 64 65 20 22 4d 61 |y__.#inc|lude "Ma|
|00000190| 63 41 70 70 43 6f 6d 70 | 61 74 69 62 69 6c 69 74 |cAppComp|atibilit|
|000001a0| 79 2e 68 22 0d 23 65 6e | 64 69 66 0d 0d 23 69 66 |y.h".#en|dif..#if|
|000001b0| 20 71 4d 61 63 41 70 70 | 56 65 72 73 69 6f 6e 20 | qMacApp|Version |
|000001c0| 21 3d 20 33 30 20 26 26 | 20 21 64 65 66 69 6e 65 |!= 30 &&| !define|
|000001d0| 64 28 5f 5f 4c 4f 57 4d | 45 4d 5f 5f 29 0d 23 69 |d(__LOWM|EM__).#i|
|000001e0| 6e 63 6c 75 64 65 20 22 | 4c 6f 77 4d 65 6d 2e 68 |nclude "|LowMem.h|
|000001f0| 22 0d 23 65 6e 64 69 66 | 0d 0d 23 70 72 61 67 6d |".#endif|..#pragm|
|00000200| 61 20 73 65 67 6d 65 6e | 74 20 41 64 4c 69 62 4c |a segmen|t AdLibL|
|00000210| 69 6e 6b 0d 0d 0d 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |ink...//|////////|
|00000220| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00000230| 2f 2f 2f 2f 2f 2f 2f 20 | 54 41 64 4c 69 62 4c 69 |/////// |TAdLibLi|
|00000240| 6e 6b 20 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |nk /////|////////|
|00000250| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00000260| 2f 2f 2f 2f 0d 2f 2f 0d | 2f 2f 09 41 20 62 65 68 |////.//.|//.A beh|
|00000270| 61 76 69 6f 72 20 74 6f | 20 72 65 63 65 69 76 65 |avior to| receive|
|00000280| 20 41 70 70 6c 65 45 76 | 65 6e 74 73 20 66 72 6f | AppleEv|ents fro|
|00000290| 6d 20 41 64 20 4c 69 62 | 20 74 6f 20 75 70 64 61 |m Ad Lib| to upda|
|000002a0| 74 65 20 74 68 65 20 61 | 70 70 6c 69 63 61 74 69 |te the a|pplicati|
|000002b0| 6f 6e 27 73 0d 2f 2f 09 | 27 56 69 65 77 27 20 72 |on's.//.|'View' r|
|000002c0| 65 73 6f 75 72 63 65 73 | 2e 20 20 41 64 64 20 74 |esources|. Add t|
|000002d0| 68 69 73 20 6f 62 6a 65 | 63 74 20 74 6f 20 79 6f |his obje|ct to yo|
|000002e0| 75 72 20 62 75 69 6c 64 | 20 61 6e 64 20 64 65 72 |ur build| and der|
|000002f0| 69 76 65 20 79 6f 75 72 | 20 61 70 70 6c 69 63 61 |ive your| applica|
|00000300| 74 69 6f 6e 0d 2f 2f 09 | 6f 62 6a 65 63 74 20 66 |tion.//.|object f|
|00000310| 72 6f 6d 20 54 42 65 68 | 61 76 69 6f 72 41 70 70 |rom TBeh|aviorApp|
|00000320| 2e 20 20 46 69 6e 61 6c | 6c 79 2c 20 69 6e 63 6c |. Final|ly, incl|
|00000330| 75 64 65 20 74 68 65 20 | 41 64 4c 69 62 4c 69 6e |ude the |AdLibLin|
|00000340| 6b 2e 72 20 66 69 6c 65 | 20 69 6e 20 79 6f 75 72 |k.r file| in your|
|00000350| 20 62 75 69 6c 64 2e 0d | 2f 2f 09 54 68 69 73 20 | build..|//.This |
|00000360| 77 69 6c 6c 20 70 65 72 | 6d 69 74 20 79 6f 75 72 |will per|mit your|
|00000370| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 74 6f 20 | applica|tion to |
|00000380| 62 65 20 75 73 65 64 20 | 77 69 74 68 20 74 68 65 |be used |with the|
|00000390| 20 27 4c 69 6e 6b 20 41 | 70 70 6c 69 63 61 74 69 | 'Link A|pplicati|
|000003a0| 6f 6e 27 0d 2f 2f 09 66 | 75 6e 63 74 69 6f 6e 20 |on'.//.f|unction |
|000003b0| 69 6e 20 41 64 20 4c 69 | 62 2e 0d 2f 2f 0d 0d 63 |in Ad Li|b..//..c|
|000003c0| 6c 61 73 73 20 54 41 64 | 4c 69 62 4c 69 6e 6b 20 |lass TAd|LibLink |
|000003d0| 3a 20 70 75 62 6c 69 63 | 20 54 42 65 68 61 76 69 |: public| TBehavi|
|000003e0| 6f 72 0d 7b 0d 23 69 66 | 20 71 4d 61 63 41 70 70 |or.{.#if| qMacApp|
|000003f0| 56 65 72 73 69 6f 6e 20 | 3e 20 33 30 0d 09 4d 41 |Version |> 30..MA|
|00000400| 5f 44 45 43 4c 41 52 45 | 5f 43 4c 41 53 53 3b 0d |_DECLARE|_CLASS;.|
|00000410| 23 65 6e 64 69 66 0d 0d | 09 70 75 62 6c 69 63 3a |#endif..|.public:|
|00000420| 0d 23 69 66 20 71 4d 61 | 63 41 70 70 56 65 72 73 |.#if qMa|cAppVers|
|00000430| 69 6f 6e 20 3e 20 33 33 | 0d 09 09 54 41 64 4c 69 |ion > 33|...TAdLi|
|00000440| 62 4c 69 6e 6b 28 49 44 | 54 79 70 65 20 69 74 73 |bLink(ID|Type its|
|00000450| 49 64 65 6e 74 69 66 69 | 65 72 20 3d 20 6b 4e 6f |Identifi|er = kNo|
|00000460| 49 64 65 6e 74 69 66 69 | 65 72 5f 41 43 29 3b 0d |Identifi|er_AC);.|
|00000470| 23 65 6c 73 65 0d 09 09 | 56 49 52 54 55 41 4c 09 |#else...|VIRTUAL.|
|00000480| 76 6f 69 64 09 09 09 49 | 41 64 4c 69 62 4c 69 6e |void...I|AdLibLin|
|00000490| 6b 28 49 44 54 79 70 65 | 20 69 74 73 49 64 65 6e |k(IDType| itsIden|
|000004a0| 74 69 66 69 65 72 29 3b | 0d 23 65 6e 64 69 66 0d |tifier);|.#endif.|
|000004b0| 0d 23 69 66 20 71 4d 61 | 63 41 70 70 56 65 72 73 |.#if qMa|cAppVers|
|000004c0| 69 6f 6e 20 3d 3d 20 33 | 30 20 7c 7c 20 71 4d 61 |ion == 3|0 || qMa|
|000004d0| 63 41 70 70 56 65 72 73 | 69 6f 6e 20 3d 3d 20 33 |cAppVers|ion == 3|
|000004e0| 31 0d 09 09 56 49 52 54 | 55 41 4c 20 76 6f 69 64 |1...VIRT|UAL void|
|000004f0| 09 09 09 44 6f 41 70 70 | 6c 65 43 6f 6d 6d 61 6e |...DoApp|leComman|
|00000500| 64 28 43 6f 6d 6d 61 6e | 64 4e 75 6d 62 65 72 20 |d(Comman|dNumber |
|00000510| 63 6d 64 2c 20 63 6f 6e | 73 74 20 41 70 70 6c 65 |cmd, con|st Apple|
|00000520| 45 76 65 6e 74 26 20 6d | 65 73 73 61 67 65 2c 20 |Event& m|essage, |
|00000530| 63 6f 6e 73 74 20 41 70 | 70 6c 65 45 76 65 6e 74 |const Ap|pleEvent|
|00000540| 26 20 72 65 70 6c 79 29 | 3b 0d 23 65 6c 73 65 0d |& reply)|;.#else.|
|00000550| 09 09 56 49 52 54 55 41 | 4c 20 42 4f 4f 4c 45 41 |..VIRTUA|L BOOLEA|
|00000560| 4e 09 09 44 6f 53 63 72 | 69 70 74 43 6f 6d 6d 61 |N..DoScr|iptComma|
|00000570| 6e 64 28 43 6f 6d 6d 61 | 6e 64 4e 75 6d 62 65 72 |nd(Comma|ndNumber|
|00000580| 20 63 6d 64 2c 20 54 41 | 70 70 6c 65 45 76 65 6e | cmd, TA|ppleEven|
|00000590| 74 2a 20 6d 65 73 73 61 | 67 65 2c 20 54 41 70 70 |t* messa|ge, TApp|
|000005a0| 6c 65 45 76 65 6e 74 2a | 20 72 65 70 6c 79 29 3b |leEvent*| reply);|
|000005b0| 0d 23 65 6e 64 69 66 0d | 0d 09 70 72 69 76 61 74 |.#endif.|..privat|
|000005c0| 65 3a 0d 09 09 09 09 09 | 09 76 6f 69 64 09 09 09 |e:......|.void...|
|000005d0| 41 64 64 28 63 6f 6e 73 | 74 20 41 70 70 6c 65 45 |Add(cons|t AppleE|
|000005e0| 76 65 6e 74 26 20 6d 65 | 73 73 61 67 65 2c 20 41 |vent& me|ssage, A|
|000005f0| 70 70 6c 65 45 76 65 6e | 74 26 20 72 65 70 6c 79 |ppleEven|t& reply|
|00000600| 29 3b 0d 09 09 09 09 09 | 09 76 6f 69 64 09 09 09 |);......|.void...|
|00000610| 43 68 61 6e 67 65 28 63 | 6f 6e 73 74 20 41 70 70 |Change(c|onst App|
|00000620| 6c 65 45 76 65 6e 74 26 | 20 6d 65 73 73 61 67 65 |leEvent&| message|
|00000630| 2c 20 41 70 70 6c 65 45 | 76 65 6e 74 26 20 72 65 |, AppleE|vent& re|
|00000640| 70 6c 79 29 3b 0d 09 09 | 09 09 09 09 76 6f 69 64 |ply);...|....void|
|00000650| 09 09 09 52 65 6d 6f 76 | 65 28 63 6f 6e 73 74 20 |...Remov|e(const |
|00000660| 41 70 70 6c 65 45 76 65 | 6e 74 26 20 6d 65 73 73 |AppleEve|nt& mess|
|00000670| 61 67 65 2c 20 41 70 70 | 6c 65 45 76 65 6e 74 26 |age, App|leEvent&|
|00000680| 20 72 65 70 6c 79 29 3b | 0d 09 09 09 09 09 09 76 | reply);|.......v|
|00000690| 6f 69 64 09 09 09 53 65 | 74 28 63 6f 6e 73 74 20 |oid...Se|t(const |
|000006a0| 41 70 70 6c 65 45 76 65 | 6e 74 26 20 6d 65 73 73 |AppleEve|nt& mess|
|000006b0| 61 67 65 2c 20 41 70 70 | 6c 65 45 76 65 6e 74 26 |age, App|leEvent&|
|000006c0| 20 72 65 70 6c 79 29 3b | 0d 7d 3b 0d 0d 23 69 66 | reply);|.};..#if|
|000006d0| 20 71 4d 61 63 41 70 70 | 56 65 72 73 69 6f 6e 20 | qMacApp|Version |
|000006e0| 3e 20 33 30 0d 4d 41 5f | 44 45 46 49 4e 45 5f 43 |> 30.MA_|DEFINE_C|
|000006f0| 4c 41 53 53 5f 4d 31 28 | 54 41 64 4c 69 62 4c 69 |LASS_M1(|TAdLibLi|
|00000700| 6e 6b 2c 20 54 42 65 68 | 61 76 69 6f 72 29 3b 0d |nk, TBeh|avior);.|
|00000710| 23 65 6e 64 69 66 0d 0d | 0d 23 70 72 61 67 6d 61 |#endif..|.#pragma|
|00000720| 20 73 65 67 6d 65 6e 74 | 20 4d 41 42 65 68 61 76 | segment| MABehav|
|00000730| 69 6f 72 52 65 73 0d 0d | 63 6f 6e 73 74 20 73 68 |iorRes..|const sh|
|00000740| 6f 72 74 20 6d 50 69 6e | 67 4d 73 67 09 09 3d 20 |ort mPin|gMsg..= |
|00000750| 39 39 30 3b 0d 63 6f 6e | 73 74 20 73 68 6f 72 74 |990;.con|st short|
|00000760| 20 6d 41 64 64 4d 73 67 | 09 09 09 3d 20 39 39 31 | mAddMsg|...= 991|
|00000770| 3b 0d 63 6f 6e 73 74 20 | 73 68 6f 72 74 20 6d 43 |;.const |short mC|
|00000780| 68 61 6e 67 65 4d 73 67 | 09 3d 20 39 39 32 3b 0d |hangeMsg|.= 992;.|
|00000790| 63 6f 6e 73 74 20 73 68 | 6f 72 74 20 6d 52 65 6d |const sh|ort mRem|
|000007a0| 6f 76 65 4d 73 67 09 3d | 20 39 39 33 3b 0d 63 6f |oveMsg.=| 993;.co|
|000007b0| 6e 73 74 20 73 68 6f 72 | 74 20 6d 53 65 74 4d 73 |nst shor|t mSetMs|
|000007c0| 67 09 09 09 3d 20 39 39 | 34 3b 0d 63 6f 6e 73 74 |g...= 99|4;.const|
|000007d0| 20 73 68 6f 72 74 20 6d | 55 70 64 61 74 65 4d 73 | short m|UpdateMs|
|000007e0| 67 09 3d 20 39 39 35 3b | 0d 0d 23 69 66 20 71 4d |g.= 995;|..#if qM|
|000007f0| 61 63 41 70 70 56 65 72 | 73 69 6f 6e 20 3e 20 33 |acAppVer|sion > 3|
|00000800| 33 0d 0d 2f 2f 09 43 6f | 6e 73 74 72 75 63 74 6f |3..//.Co|nstructo|
|00000810| 72 0d 2f 2f 09 69 74 73 | 49 64 65 6e 74 69 66 69 |r.//.its|Identifi|
|00000820| 65 72 3a 09 74 68 65 20 | 62 65 68 61 76 69 6f 72 |er:.the |behavior|
|00000830| 27 73 20 69 64 65 6e 74 | 69 66 69 65 72 0d 2f 2f |'s ident|ifier.//|
|00000840| 0d 54 41 64 4c 69 62 4c | 69 6e 6b 3a 3a 54 41 64 |.TAdLibL|ink::TAd|
|00000850| 4c 69 62 4c 69 6e 6b 28 | 49 44 54 79 70 65 20 69 |LibLink(|IDType i|
|00000860| 74 73 49 64 65 6e 74 69 | 66 69 65 72 29 20 3a 0d |tsIdenti|fier) :.|
|00000870| 09 54 42 65 68 61 76 69 | 6f 72 28 69 74 73 49 64 |.TBehavi|or(itsId|
|00000880| 65 6e 74 69 66 69 65 72 | 29 0d 7b 0d 7d 0d 0d 23 |entifier|).{.}..#|
|00000890| 65 6e 64 69 66 0d 0d 23 | 69 66 20 71 4d 61 63 41 |endif..#|if qMacA|
|000008a0| 70 70 56 65 72 73 69 6f | 6e 20 3d 3d 20 33 30 20 |ppVersio|n == 30 |
|000008b0| 7c 7c 20 71 4d 61 63 41 | 70 70 56 65 72 73 69 6f ||| qMacA|ppVersio|
|000008c0| 6e 20 3d 3d 20 33 31 0d | 0d 2f 2f 09 4f 76 65 72 |n == 31.|.//.Over|
|000008d0| 72 69 64 65 73 20 54 42 | 65 68 61 76 69 6f 72 0d |rides TB|ehavior.|
|000008e0| 2f 2f 09 48 61 6e 64 6c | 65 20 41 64 20 4c 69 62 |//.Handl|e Ad Lib|
|000008f0| 27 73 20 72 65 73 6f 75 | 72 63 65 20 73 61 76 69 |'s resou|rce savi|
|00000900| 6e 67 20 41 70 70 6c 65 | 45 76 65 6e 74 73 2e 0d |ng Apple|Events..|
|00000910| 2f 2f 0d 4d 41 43 41 50 | 50 5f 4d 45 54 48 4f 44 |//.MACAP|P_METHOD|
|00000920| 0d 76 6f 69 64 20 54 41 | 64 4c 69 62 4c 69 6e 6b |.void TA|dLibLink|
|00000930| 3a 3a 44 6f 41 70 70 6c | 65 43 6f 6d 6d 61 6e 64 |::DoAppl|eCommand|
|00000940| 28 43 6f 6d 6d 61 6e 64 | 4e 75 6d 62 65 72 20 63 |(Command|Number c|
|00000950| 6d 64 2c 20 63 6f 6e 73 | 74 20 41 70 70 6c 65 45 |md, cons|t AppleE|
|00000960| 76 65 6e 74 26 20 6d 65 | 73 73 61 67 65 2c 20 63 |vent& me|ssage, c|
|00000970| 6f 6e 73 74 20 41 70 70 | 6c 65 45 76 65 6e 74 26 |onst App|leEvent&|
|00000980| 20 72 65 70 6c 79 29 0d | 7b 0d 09 73 77 69 74 63 | reply).|{..switc|
|00000990| 68 20 28 63 6d 64 29 0d | 09 7b 0d 09 09 63 61 73 |h (cmd).|.{...cas|
|000009a0| 65 20 6d 50 69 6e 67 4d | 73 67 3a 09 09 62 72 65 |e mPingM|sg:..bre|
|000009b0| 61 6b 3b 0d 09 09 63 61 | 73 65 20 6d 41 64 64 4d |ak;...ca|se mAddM|
|000009c0| 73 67 3a 09 09 09 41 64 | 64 28 6d 65 73 73 61 67 |sg:...Ad|d(messag|
|000009d0| 65 2c 20 72 65 70 6c 79 | 29 3b 0d 09 09 09 09 09 |e, reply|);......|
|000009e0| 09 09 09 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 63 |......br|eak;...c|
|000009f0| 61 73 65 20 6d 43 68 61 | 6e 67 65 4d 73 67 3a 09 |ase mCha|ngeMsg:.|
|00000a00| 43 68 61 6e 67 65 28 6d | 65 73 73 61 67 65 2c 20 |Change(m|essage, |
|00000a10| 72 65 70 6c 79 29 3b 0d | 09 09 09 09 09 09 09 09 |reply);.|........|
|00000a20| 09 09 09 62 72 65 61 6b | 3b 0d 09 09 63 61 73 65 |...break|;...case|
|00000a30| 20 6d 52 65 6d 6f 76 65 | 4d 73 67 3a 09 52 65 6d | mRemove|Msg:.Rem|
|00000a40| 6f 76 65 28 6d 65 73 73 | 61 67 65 2c 20 72 65 70 |ove(mess|age, rep|
|00000a50| 6c 79 29 3b 0d 09 09 09 | 09 09 09 09 09 09 09 09 |ly);....|........|
|00000a60| 62 72 65 61 6b 3b 0d 09 | 09 63 61 73 65 20 6d 53 |break;..|.case mS|
|00000a70| 65 74 4d 73 67 3a 09 09 | 09 53 65 74 28 6d 65 73 |etMsg:..|.Set(mes|
|00000a80| 73 61 67 65 2c 20 72 65 | 70 6c 79 29 3b 0d 09 09 |sage, re|ply);...|
|00000a90| 09 09 09 09 09 09 09 09 | 09 62 72 65 61 6b 3b 0d |........|.break;.|
|00000aa0| 09 09 63 61 73 65 20 6d | 55 70 64 61 74 65 4d 73 |..case m|UpdateMs|
|00000ab0| 67 3a 09 55 70 64 61 74 | 65 52 65 73 46 69 6c 65 |g:.Updat|eResFile|
|00000ac0| 28 67 41 70 70 6c 69 63 | 61 74 69 6f 6e 52 65 66 |(gApplic|ationRef|
|00000ad0| 4e 75 6d 29 3b 0d 09 09 | 09 09 09 09 09 09 09 09 |Num);...|........|
|00000ae0| 09 54 48 52 4f 57 49 46 | 52 45 53 45 52 52 4f 52 |.THROWIF|RESERROR|
|00000af0| 28 29 3b 0d 09 09 09 09 | 09 09 09 09 09 09 09 62 |();.....|.......b|
|00000b00| 72 65 61 6b 3b 0d 09 09 | 64 65 66 61 75 6c 74 3a |reak;...|default:|
|00000b10| 09 09 09 09 09 54 42 65 | 68 61 76 69 6f 72 3a 3a |.....TBe|havior::|
|00000b20| 44 6f 41 70 70 6c 65 43 | 6f 6d 6d 61 6e 64 28 63 |DoAppleC|ommand(c|
|00000b30| 6d 64 2c 20 6d 65 73 73 | 61 67 65 2c 20 72 65 70 |md, mess|age, rep|
|00000b40| 6c 79 29 3b 0d 09 09 09 | 09 09 09 09 09 09 09 09 |ly);....|........|
|00000b50| 62 72 65 61 6b 3b 0d 09 | 7d 0d 7d 0d 0d 23 65 6c |break;..|}.}..#el|
|00000b60| 73 65 0d 0d 2f 2f 09 4f | 76 65 72 72 69 64 65 73 |se..//.O|verrides|
|00000b70| 20 54 42 65 68 61 76 69 | 6f 72 0d 2f 2f 09 48 61 | TBehavi|or.//.Ha|
|00000b80| 6e 64 6c 65 20 41 64 20 | 4c 69 62 27 73 20 72 65 |ndle Ad |Lib's re|
|00000b90| 73 6f 75 72 63 65 20 73 | 61 76 69 6e 67 20 41 70 |source s|aving Ap|
|00000ba0| 70 6c 65 45 76 65 6e 74 | 73 2e 0d 2f 2f 0d 2f 2f |pleEvent|s..//.//|
|00000bb0| 20 62 70 61 20 36 2f 32 | 30 2f 39 37 20 2d 20 63 | bpa 6/2|0/97 - c|
|00000bc0| 68 61 6e 67 65 64 20 66 | 4d 65 73 73 61 67 65 20 |hanged f|Message |
|00000bd0| 74 6f 20 47 65 74 41 45 | 44 65 73 63 0d 0d 69 6e |to GetAE|Desc..in|
|00000be0| 6c 69 6e 65 20 41 45 44 | 65 73 63 20 47 65 74 41 |line AED|esc GetA|
|00000bf0| 45 44 65 73 63 28 54 41 | 70 70 6c 65 45 76 65 6e |EDesc(TA|ppleEven|
|00000c00| 74 2a 20 65 76 65 6e 74 | 29 20 0d 23 69 66 20 71 |t* event|) .#if q|
|00000c10| 4d 61 63 41 70 70 56 65 | 72 73 69 6f 6e 20 3e 20 |MacAppVe|rsion > |
|00000c20| 33 33 0d 7b 20 72 65 74 | 75 72 6e 20 2a 65 76 65 |33.{ ret|urn *eve|
|00000c30| 6e 74 3b 20 7d 0d 23 65 | 6c 73 65 0d 7b 20 72 65 |nt; }.#e|lse.{ re|
|00000c40| 74 75 72 6e 20 65 76 65 | 6e 74 2d 3e 66 4d 65 73 |turn eve|nt->fMes|
|00000c50| 73 61 67 65 3b 20 7d 0d | 23 65 6e 64 69 66 0d 0d |sage; }.|#endif..|
|00000c60| 4d 41 43 41 50 50 5f 4d | 45 54 48 4f 44 0d 42 4f |MACAPP_M|ETHOD.BO|
|00000c70| 4f 4c 45 41 4e 20 54 41 | 64 4c 69 62 4c 69 6e 6b |OLEAN TA|dLibLink|
|00000c80| 3a 3a 44 6f 53 63 72 69 | 70 74 43 6f 6d 6d 61 6e |::DoScri|ptComman|
|00000c90| 64 28 43 6f 6d 6d 61 6e | 64 4e 75 6d 62 65 72 20 |d(Comman|dNumber |
|00000ca0| 63 6d 64 2c 20 54 41 70 | 70 6c 65 45 76 65 6e 74 |cmd, TAp|pleEvent|
|00000cb0| 2a 20 6d 65 73 73 61 67 | 65 2c 20 54 41 70 70 6c |* messag|e, TAppl|
|00000cc0| 65 45 76 65 6e 74 2a 20 | 72 65 70 6c 79 29 0d 7b |eEvent* |reply).{|
|00000cd0| 0d 09 73 77 69 74 63 68 | 20 28 63 6d 64 29 0d 09 |..switch| (cmd)..|
|00000ce0| 7b 0d 09 09 63 61 73 65 | 20 6d 50 69 6e 67 4d 73 |{...case| mPingMs|
|00000cf0| 67 3a 09 09 62 72 65 61 | 6b 3b 0d 09 09 63 61 73 |g:..brea|k;...cas|
|00000d00| 65 20 6d 41 64 64 4d 73 | 67 3a 09 09 09 41 64 64 |e mAddMs|g:...Add|
|00000d10| 28 47 65 74 41 45 44 65 | 73 63 28 6d 65 73 73 61 |(GetAEDe|sc(messa|
|00000d20| 67 65 29 2c 20 47 65 74 | 41 45 44 65 73 63 28 72 |ge), Get|AEDesc(r|
|00000d30| 65 70 6c 79 29 29 3b 0d | 09 09 09 09 09 09 09 09 |eply));.|........|
|00000d40| 09 09 09 62 72 65 61 6b | 3b 0d 09 09 63 61 73 65 |...break|;...case|
|00000d50| 20 6d 43 68 61 6e 67 65 | 4d 73 67 3a 09 43 68 61 | mChange|Msg:.Cha|
|00000d60| 6e 67 65 28 47 65 74 41 | 45 44 65 73 63 28 6d 65 |nge(GetA|EDesc(me|
|00000d70| 73 73 61 67 65 29 2c 20 | 47 65 74 41 45 44 65 73 |ssage), |GetAEDes|
|00000d80| 63 28 72 65 70 6c 79 29 | 29 3b 0d 09 09 09 09 09 |c(reply)|);......|
|00000d90| 09 09 09 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 63 |......br|eak;...c|
|00000da0| 61 73 65 20 6d 52 65 6d | 6f 76 65 4d 73 67 3a 09 |ase mRem|oveMsg:.|
|00000db0| 52 65 6d 6f 76 65 28 47 | 65 74 41 45 44 65 73 63 |Remove(G|etAEDesc|
|00000dc0| 28 6d 65 73 73 61 67 65 | 29 2c 20 47 65 74 41 45 |(message|), GetAE|
|00000dd0| 44 65 73 63 28 72 65 70 | 6c 79 29 29 3b 0d 09 09 |Desc(rep|ly));...|
|00000de0| 09 09 09 09 09 09 09 09 | 09 62 72 65 61 6b 3b 0d |........|.break;.|
|00000df0| 09 09 63 61 73 65 20 6d | 53 65 74 4d 73 67 3a 09 |..case m|SetMsg:.|
|00000e00| 09 09 53 65 74 28 47 65 | 74 41 45 44 65 73 63 28 |..Set(Ge|tAEDesc(|
|00000e10| 6d 65 73 73 61 67 65 29 | 2c 20 47 65 74 41 45 44 |message)|, GetAED|
|00000e20| 65 73 63 28 72 65 70 6c | 79 29 29 3b 0d 09 09 09 |esc(repl|y));....|
|00000e30| 09 09 09 09 09 09 09 09 | 62 72 65 61 6b 3b 0d 09 |........|break;..|
|00000e40| 09 63 61 73 65 20 6d 55 | 70 64 61 74 65 4d 73 67 |.case mU|pdateMsg|
|00000e50| 3a 09 55 70 64 61 74 65 | 52 65 73 46 69 6c 65 28 |:.Update|ResFile(|
|00000e60| 67 41 70 70 6c 69 63 61 | 74 69 6f 6e 52 65 66 4e |gApplica|tionRefN|
|00000e70| 75 6d 29 3b 0d 09 09 09 | 09 09 09 09 09 09 09 09 |um);....|........|
|00000e80| 54 48 52 4f 57 49 46 52 | 45 53 45 52 52 4f 52 28 |THROWIFR|ESERROR(|
|00000e90| 29 3b 0d 09 09 09 09 09 | 09 09 09 09 09 09 62 72 |);......|......br|
|00000ea0| 65 61 6b 3b 0d 09 09 64 | 65 66 61 75 6c 74 3a 09 |eak;...d|efault:.|
|00000eb0| 09 09 09 09 72 65 74 75 | 72 6e 20 54 42 65 68 61 |....retu|rn TBeha|
|00000ec0| 76 69 6f 72 3a 3a 44 6f | 53 63 72 69 70 74 43 6f |vior::Do|ScriptCo|
|00000ed0| 6d 6d 61 6e 64 28 63 6d | 64 2c 20 6d 65 73 73 61 |mmand(cm|d, messa|
|00000ee0| 67 65 2c 20 72 65 70 6c | 79 29 3b 0d 09 7d 0d 0d |ge, repl|y);..}..|
|00000ef0| 09 72 65 74 75 72 6e 20 | 54 52 55 45 3b 0d 7d 0d |.return |TRUE;.}.|
|00000f00| 0d 23 65 6e 64 69 66 0d | 0d 0d 23 70 72 61 67 6d |.#endif.|..#pragm|
|00000f10| 61 20 73 65 67 6d 65 6e | 74 20 4d 41 4f 70 65 6e |a segmen|t MAOpen|
|00000f20| 0d 0d 2f 2f 09 49 6e 69 | 74 69 61 6c 69 7a 65 20 |..//.Ini|tialize |
|00000f30| 74 68 65 20 62 65 68 61 | 76 69 6f 72 2e 0d 2f 2f |the beha|vior..//|
|00000f40| 0d 2f 2f 09 69 74 73 49 | 64 65 6e 74 69 66 69 65 |.//.itsI|dentifie|
|00000f50| 72 3a 09 74 68 65 20 62 | 65 68 61 76 69 6f 72 27 |r:.the b|ehavior'|
|00000f60| 73 20 69 64 65 6e 74 69 | 66 69 65 72 0d 2f 2f 0d |s identi|fier.//.|
|00000f70| 23 69 66 20 71 4d 61 63 | 41 70 70 56 65 72 73 69 |#if qMac|AppVersi|
|00000f80| 6f 6e 20 3c 3d 20 33 33 | 0d 4d 41 43 41 50 50 5f |on <= 33|.MACAPP_|
|00000f90| 4d 45 54 48 4f 44 0d 76 | 6f 69 64 20 54 41 64 4c |METHOD.v|oid TAdL|
|00000fa0| 69 62 4c 69 6e 6b 3a 3a | 49 41 64 4c 69 62 4c 69 |ibLink::|IAdLibLi|
|00000fb0| 6e 6b 28 49 44 54 79 70 | 65 20 69 74 73 49 64 65 |nk(IDTyp|e itsIde|
|00000fc0| 6e 74 69 66 69 65 72 29 | 0d 7b 0d 09 49 42 65 68 |ntifier)|.{..IBeh|
|00000fd0| 61 76 69 6f 72 28 69 74 | 73 49 64 65 6e 74 69 66 |avior(it|sIdentif|
|00000fe0| 69 65 72 29 3b 0d 7d 0d | 23 65 6e 64 69 66 0d 0d |ier);.}.|#endif..|
|00000ff0| 0d 23 70 72 61 67 6d 61 | 20 73 65 67 6d 65 6e 74 |.#pragma| segment|
|00001000| 20 41 64 4c 69 62 4c 69 | 6e 6b 0d 0d 23 69 66 20 | AdLibLi|nk..#if |
|00001010| 71 4d 61 63 41 70 70 56 | 65 72 73 69 6f 6e 20 3d |qMacAppV|ersion =|
|00001020| 3d 20 33 30 0d 0d 2f 2f | 09 48 61 6e 64 6c 65 20 |= 30..//|.Handle |
|00001030| 74 68 65 20 61 64 64 20 | 72 65 73 6f 75 72 63 65 |the add |resource|
|00001040| 20 41 70 70 6c 65 45 76 | 65 6e 74 2e 0d 2f 2f 0d | AppleEv|ent..//.|
|00001050| 2f 2f 09 6d 65 73 73 61 | 67 65 3a 09 09 74 68 65 |//.messa|ge:..the|
|00001060| 20 41 70 70 6c 65 45 76 | 65 6e 74 0d 2f 2f 09 72 | AppleEv|ent.//.r|
|00001070| 65 70 6c 79 3a 09 09 09 | 74 68 65 20 72 65 70 6c |eply:...|the repl|
|00001080| 79 20 41 70 70 6c 65 45 | 76 65 6e 74 0d 2f 2f 0d |y AppleE|vent.//.|
|00001090| 76 6f 69 64 20 54 41 64 | 4c 69 62 4c 69 6e 6b 3a |void TAd|LibLink:|
|000010a0| 3a 41 64 64 28 63 6f 6e | 73 74 20 41 70 70 6c 65 |:Add(con|st Apple|
|000010b0| 45 76 65 6e 74 26 20 6d | 65 73 73 61 67 65 2c 20 |Event& m|essage, |
|000010c0| 63 6f 6e 73 74 20 41 70 | 70 6c 65 45 76 65 6e 74 |const Ap|pleEvent|
|000010d0| 26 20 72 65 70 6c 79 29 | 0d 7b 0d 09 73 68 6f 72 |& reply)|.{..shor|
|000010e0| 74 20 69 64 2c 20 61 74 | 74 72 69 62 75 74 65 73 |t id, at|tributes|
|000010f0| 3b 0d 09 52 65 73 54 79 | 70 65 20 74 79 70 65 3b |;..ResTy|pe type;|
|00001100| 0d 09 44 65 73 63 54 79 | 70 65 20 61 63 74 75 61 |..DescTy|pe actua|
|00001110| 6c 4d 73 67 54 79 70 65 | 3b 0d 09 53 69 7a 65 20 |lMsgType|;..Size |
|00001120| 73 69 7a 65 3b 0d 0d 09 | 54 48 52 4f 57 49 46 4f |size;...|THROWIFO|
|00001130| 53 45 52 52 28 41 45 47 | 65 74 50 61 72 61 6d 50 |SERR(AEG|etParamP|
|00001140| 74 72 28 6d 65 73 73 61 | 67 65 2c 20 27 52 54 59 |tr(messa|ge, 'RTY|
|00001150| 50 27 2c 20 27 52 53 52 | 43 27 2c 20 61 63 74 75 |P', 'RSR|C', actu|
|00001160| 61 6c 4d 73 67 54 79 70 | 65 2c 20 28 50 74 72 29 |alMsgTyp|e, (Ptr)|
|00001170| 20 26 74 79 70 65 2c 20 | 73 69 7a 65 6f 66 28 74 | &type, |sizeof(t|
|00001180| 79 70 65 29 2c 20 73 69 | 7a 65 29 29 3b 0d 09 54 |ype), si|ze));..T|
|00001190| 48 52 4f 57 49 46 4f 53 | 45 52 52 28 41 45 47 65 |HROWIFOS|ERR(AEGe|
|000011a0| 74 50 61 72 61 6d 50 74 | 72 28 6d 65 73 73 61 67 |tParamPt|r(messag|
|000011b0| 65 2c 20 27 52 49 44 20 | 27 2c 20 74 79 70 65 53 |e, 'RID |', typeS|
|000011c0| 68 6f 72 74 49 6e 74 65 | 67 65 72 2c 20 61 63 74 |hortInte|ger, act|
|000011d0| 75 61 6c 4d 73 67 54 79 | 70 65 2c 20 28 50 74 72 |ualMsgTy|pe, (Ptr|
|000011e0| 29 20 26 69 64 2c 20 73 | 69 7a 65 6f 66 28 69 64 |) &id, s|izeof(id|
|000011f0| 29 2c 20 73 69 7a 65 29 | 29 3b 0d 09 4f 53 45 72 |), size)|);..OSEr|
|00001200| 72 20 65 72 72 6f 72 20 | 3d 20 41 45 47 65 74 50 |r error |= AEGetP|
|00001210| 61 72 61 6d 50 74 72 28 | 6d 65 73 73 61 67 65 2c |aramPtr(|message,|
|00001220| 20 27 41 54 54 52 27 2c | 20 74 79 70 65 53 68 6f | 'ATTR',| typeSho|
|00001230| 72 74 49 6e 74 65 67 65 | 72 2c 20 61 63 74 75 61 |rtIntege|r, actua|
|00001240| 6c 4d 73 67 54 79 70 65 | 2c 20 28 50 74 72 29 20 |lMsgType|, (Ptr) |
|00001250| 26 61 74 74 72 69 62 75 | 74 65 73 2c 20 73 69 7a |&attribu|tes, siz|
|00001260| 65 6f 66 28 69 64 29 2c | 20 73 69 7a 65 29 3b 0d |eof(id),| size);.|
|00001270| 09 42 6f 6f 6c 65 61 6e | 20 73 65 74 41 74 74 72 |.Boolean| setAttr|
|00001280| 69 62 75 74 65 73 20 3d | 20 28 65 72 72 6f 72 20 |ibutes =| (error |
|00001290| 3d 3d 20 6e 6f 45 72 72 | 29 3b 0d 09 69 66 20 28 |== noErr|);..if (|
|000012a0| 65 72 72 6f 72 20 3d 3d | 20 65 72 72 41 45 44 65 |error ==| errAEDe|
|000012b0| 73 63 4e 6f 74 46 6f 75 | 6e 64 29 0d 09 09 65 72 |scNotFou|nd)...er|
|000012c0| 72 6f 72 20 3d 20 6e 6f | 45 72 72 3b 0d 09 54 48 |ror = no|Err;..TH|
|000012d0| 52 4f 57 49 46 4f 53 45 | 52 52 28 65 72 72 6f 72 |ROWIFOSE|RR(error|
|000012e0| 29 3b 0d 09 54 48 52 4f | 57 49 46 4f 53 45 52 52 |);..THRO|WIFOSERR|
|000012f0| 28 41 45 53 69 7a 65 4f | 66 50 61 72 61 6d 28 6d |(AESizeO|fParam(m|
|00001300| 65 73 73 61 67 65 2c 20 | 27 44 41 54 41 27 2c 20 |essage, |'DATA', |
|00001310| 61 63 74 75 61 6c 4d 73 | 67 54 79 70 65 2c 20 73 |actualMs|gType, s|
|00001320| 69 7a 65 29 29 3b 0d 0d | 09 69 66 20 28 73 69 7a |ize));..|.if (siz|
|00001330| 65 20 3e 20 30 29 0d 09 | 7b 0d 09 09 4d 41 56 6f |e > 0)..|{...MAVo|
|00001340| 6c 61 74 69 6c 65 49 6e | 69 74 28 48 61 6e 64 6c |latileIn|it(Handl|
|00001350| 65 2c 20 64 61 74 61 2c | 20 4e 55 4c 4c 29 3b 0d |e, data,| NULL);.|
|00001360| 09 09 46 61 69 6c 49 6e | 66 6f 20 66 69 3b 0d 09 |..FailIn|fo fi;..|
|00001370| 09 54 52 59 28 66 69 29 | 0d 09 09 7b 0d 09 09 09 |.TRY(fi)|...{....|
|00001380| 64 61 74 61 20 3d 20 4e | 65 77 50 65 72 6d 48 61 |data = N|ewPermHa|
|00001390| 6e 64 6c 65 28 73 69 7a | 65 29 3b 0d 09 09 09 48 |ndle(siz|e);....H|
|000013a0| 4c 6f 63 6b 28 64 61 74 | 61 29 3b 0d 09 09 09 54 |Lock(dat|a);....T|
|000013b0| 48 52 4f 57 49 46 4f 53 | 45 52 52 28 41 45 47 65 |HROWIFOS|ERR(AEGe|
|000013c0| 74 50 61 72 61 6d 50 74 | 72 28 6d 65 73 73 61 67 |tParamPt|r(messag|
|000013d0| 65 2c 20 27 44 41 54 41 | 27 2c 20 27 64 61 74 61 |e, 'DATA|', 'data|
|000013e0| 27 2c 20 61 63 74 75 61 | 6c 4d 73 67 54 79 70 65 |', actua|lMsgType|
|000013f0| 2c 20 2a 64 61 74 61 2c | 20 73 69 7a 65 2c 20 73 |, *data,| size, s|
|00001400| 69 7a 65 29 29 3b 0d 09 | 09 09 48 55 6e 6c 6f 63 |ize));..|..HUnloc|
|00001410| 6b 28 64 61 74 61 29 3b | 0d 09 09 09 73 68 6f 72 |k(data);|....shor|
|00001420| 74 20 63 75 72 52 73 72 | 63 46 69 6c 65 20 3d 20 |t curRsr|cFile = |
|00001430| 55 53 45 52 45 53 46 49 | 4c 45 28 67 41 70 70 6c |USERESFI|LE(gAppl|
|00001440| 69 63 61 74 69 6f 6e 52 | 65 66 4e 75 6d 29 3b 0d |icationR|efNum);.|
|00001450| 09 09 09 41 64 64 52 65 | 73 6f 75 72 63 65 28 64 |...AddRe|source(d|
|00001460| 61 74 61 2c 20 74 79 70 | 65 2c 20 69 64 2c 20 67 |ata, typ|e, id, g|
|00001470| 45 6d 70 74 79 53 74 72 | 69 6e 67 29 3b 0d 09 09 |EmptyStr|ing);...|
|00001480| 09 65 72 72 6f 72 20 3d | 20 52 65 73 45 72 72 6f |.error =| ResErro|
|00001490| 72 28 29 3b 0d 09 09 09 | 55 53 45 52 45 53 46 49 |r();....|USERESFI|
|000014a0| 4c 45 28 63 75 72 52 73 | 72 63 46 69 6c 65 29 3b |LE(curRs|rcFile);|
|000014b0| 0d 09 09 09 54 48 52 4f | 57 49 46 4f 53 45 52 52 |....THRO|WIFOSERR|
|000014c0| 28 65 72 72 6f 72 29 3b | 0d 09 09 09 69 66 20 28 |(error);|....if (|
|000014d0| 73 65 74 41 74 74 72 69 | 62 75 74 65 73 29 0d 09 |setAttri|butes)..|
|000014e0| 09 09 7b 0d 09 09 09 09 | 53 65 74 52 65 73 41 74 |..{.....|SetResAt|
|000014f0| 74 72 73 28 64 61 74 61 | 2c 20 61 74 74 72 69 62 |trs(data|, attrib|
|00001500| 75 74 65 73 29 3b 0d 09 | 09 09 09 54 48 52 4f 57 |utes);..|...THROW|
|00001510| 49 46 52 45 53 45 52 52 | 4f 52 28 29 3b 0d 09 09 |IFRESERR|OR();...|
|00001520| 09 09 43 68 61 6e 67 65 | 64 52 65 73 6f 75 72 63 |..Change|dResourc|
|00001530| 65 28 64 61 74 61 29 3b | 0d 09 09 09 09 54 48 52 |e(data);|.....THR|
|00001540| 4f 57 49 46 52 45 53 45 | 52 52 4f 52 28 29 3b 0d |OWIFRESE|RROR();.|
|00001550| 09 09 09 7d 0d 09 09 09 | 66 69 2e 53 75 63 63 65 |...}....|fi.Succe|
|00001560| 73 73 28 29 3b 0d 09 09 | 7d 0d 09 09 65 6c 73 65 |ss();...|}...else|
|00001570| 0d 09 09 7b 0d 09 09 09 | 44 49 53 50 4f 53 45 49 |...{....|DISPOSEI|
|00001580| 46 48 41 4e 44 4c 45 28 | 64 61 74 61 29 3b 0d 09 |FHANDLE(|data);..|
|00001590| 09 09 65 72 72 6f 72 20 | 3d 20 66 69 2e 65 72 72 |..error |= fi.err|
|000015a0| 6f 72 3b 0d 09 09 7d 0d | 09 7d 0d 09 54 48 52 4f |or;...}.|.}..THRO|
|000015b0| 57 49 46 4f 53 45 52 52 | 28 41 45 50 75 74 50 61 |WIFOSERR|(AEPutPa|
|000015c0| 72 61 6d 50 74 72 28 72 | 65 70 6c 79 2c 20 6b 65 |ramPtr(r|eply, ke|
|000015d0| 79 45 72 72 6f 72 4e 75 | 6d 62 65 72 2c 20 74 79 |yErrorNu|mber, ty|
|000015e0| 70 65 53 68 6f 72 74 49 | 6e 74 65 67 65 72 2c 20 |peShortI|nteger, |
|000015f0| 28 50 74 72 29 20 26 65 | 72 72 6f 72 2c 20 73 69 |(Ptr) &e|rror, si|
|00001600| 7a 65 6f 66 28 65 72 72 | 6f 72 29 29 29 3b 0d 7d |zeof(err|or)));.}|
|00001610| 0d 0d 0d 2f 2f 09 48 61 | 6e 64 6c 65 20 74 68 65 |...//.Ha|ndle the|
|00001620| 20 63 68 61 6e 67 65 64 | 20 72 65 73 6f 75 72 63 | changed| resourc|
|00001630| 65 20 41 70 70 6c 65 45 | 76 65 6e 74 2e 0d 2f 2f |e AppleE|vent..//|
|00001640| 0d 2f 2f 09 6d 65 73 73 | 61 67 65 3a 09 09 74 68 |.//.mess|age:..th|
|00001650| 65 20 41 70 70 6c 65 45 | 76 65 6e 74 0d 2f 2f 09 |e AppleE|vent.//.|
|00001660| 72 65 70 6c 79 3a 09 09 | 09 74 68 65 20 72 65 70 |reply:..|.the rep|
|00001670| 6c 79 20 41 70 70 6c 65 | 45 76 65 6e 74 0d 2f 2f |ly Apple|Event.//|
|00001680| 0d 76 6f 69 64 20 54 41 | 64 4c 69 62 4c 69 6e 6b |.void TA|dLibLink|
|00001690| 3a 3a 43 68 61 6e 67 65 | 28 63 6f 6e 73 74 20 41 |::Change|(const A|
|000016a0| 70 70 6c 65 45 76 65 6e | 74 26 20 6d 65 73 73 61 |ppleEven|t& messa|
|000016b0| 67 65 2c 20 63 6f 6e 73 | 74 20 41 70 70 6c 65 45 |ge, cons|t AppleE|
|000016c0| 76 65 6e 74 26 20 72 65 | 70 6c 79 29 0d 7b 0d 09 |vent& re|ply).{..|
|000016d0| 73 68 6f 72 74 20 69 64 | 3b 0d 09 52 65 73 54 79 |short id|;..ResTy|
|000016e0| 70 65 20 74 79 70 65 3b | 0d 09 44 65 73 63 54 79 |pe type;|..DescTy|
|000016f0| 70 65 20 61 63 74 75 61 | 6c 4d 73 67 54 79 70 65 |pe actua|lMsgType|
|00001700| 3b 0d 09 53 69 7a 65 20 | 73 69 7a 65 3b 0d 09 4f |;..Size |size;..O|
|00001710| 53 45 72 72 20 65 72 72 | 6f 72 3b 0d 0d 09 54 48 |SErr err|or;...TH|
|00001720| 52 4f 57 49 46 4f 53 45 | 52 52 28 41 45 47 65 74 |ROWIFOSE|RR(AEGet|
|00001730| 50 61 72 61 6d 50 74 72 | 28 6d 65 73 73 61 67 65 |ParamPtr|(message|
|00001740| 2c 20 27 52 54 59 50 27 | 2c 20 27 52 53 52 43 27 |, 'RTYP'|, 'RSRC'|
|00001750| 2c 20 61 63 74 75 61 6c | 4d 73 67 54 79 70 65 2c |, actual|MsgType,|
|00001760| 20 28 50 74 72 29 20 26 | 74 79 70 65 2c 20 73 69 | (Ptr) &|type, si|
|00001770| 7a 65 6f 66 28 74 79 70 | 65 29 2c 20 73 69 7a 65 |zeof(typ|e), size|
|00001780| 29 29 3b 0d 09 54 48 52 | 4f 57 49 46 4f 53 45 52 |));..THR|OWIFOSER|
|00001790| 52 28 41 45 47 65 74 50 | 61 72 61 6d 50 74 72 28 |R(AEGetP|aramPtr(|
|000017a0| 6d 65 73 73 61 67 65 2c | 20 27 52 49 44 20 27 2c |message,| 'RID ',|
|000017b0| 20 74 79 70 65 53 68 6f | 72 74 49 6e 74 65 67 65 | typeSho|rtIntege|
|000017c0| 72 2c 20 61 63 74 75 61 | 6c 4d 73 67 54 79 70 65 |r, actua|lMsgType|
|000017d0| 2c 20 28 50 74 72 29 20 | 26 69 64 2c 20 73 69 7a |, (Ptr) |&id, siz|
|000017e0| 65 6f 66 28 69 64 29 2c | 20 73 69 7a 65 29 29 3b |eof(id),| size));|
|000017f0| 0d 09 54 48 52 4f 57 49 | 46 4f 53 45 52 52 28 41 |..THROWI|FOSERR(A|
|00001800| 45 53 69 7a 65 4f 66 50 | 61 72 61 6d 28 6d 65 73 |ESizeOfP|aram(mes|
|00001810| 73 61 67 65 2c 20 27 44 | 41 54 41 27 2c 20 61 63 |sage, 'D|ATA', ac|
|00001820| 74 75 61 6c 4d 73 67 54 | 79 70 65 2c 20 73 69 7a |tualMsgT|ype, siz|
|00001830| 65 29 29 3b 0d 0d 09 73 | 68 6f 72 74 20 63 75 72 |e));...s|hort cur|
|00001840| 52 73 72 63 46 69 6c 65 | 20 3d 20 55 53 45 52 45 |RsrcFile| = USERE|
|00001850| 53 46 49 4c 45 28 67 41 | 70 70 6c 69 63 61 74 69 |SFILE(gA|pplicati|
|00001860| 6f 6e 52 65 66 4e 75 6d | 29 3b 0d 09 42 6f 6f 6c |onRefNum|);..Bool|
|00001870| 65 61 6e 20 6f 6c 64 50 | 65 72 6d 20 3d 20 50 65 |ean oldP|erm = Pe|
|00001880| 72 6d 41 6c 6c 6f 63 61 | 74 69 6f 6e 28 54 52 55 |rmAlloca|tion(TRU|
|00001890| 45 29 3b 0d 09 48 61 6e | 64 6c 65 20 72 73 72 63 |E);..Han|dle rsrc|
|000018a0| 20 3d 20 47 65 74 31 52 | 65 73 6f 75 72 63 65 28 | = Get1R|esource(|
|000018b0| 74 79 70 65 2c 20 69 64 | 29 3b 0d 09 65 72 72 6f |type, id|);..erro|
|000018c0| 72 20 3d 20 52 65 73 45 | 72 72 6f 72 28 29 3b 0d |r = ResE|rror();.|
|000018d0| 09 50 65 72 6d 41 6c 6c | 6f 63 61 74 69 6f 6e 28 |.PermAll|ocation(|
|000018e0| 6f 6c 64 50 65 72 6d 29 | 3b 0d 09 55 53 45 52 45 |oldPerm)|;..USERE|
|000018f0| 53 46 49 4c 45 28 63 75 | 72 52 73 72 63 46 69 6c |SFILE(cu|rRsrcFil|
|00001900| 65 29 3b 0d 09 69 66 20 | 28 65 72 72 6f 72 20 3d |e);..if |(error =|
|00001910| 3d 20 6e 6f 45 72 72 29 | 0d 09 7b 0d 09 09 46 61 |= noErr)|..{...Fa|
|00001920| 69 6c 49 6e 66 6f 20 66 | 69 3b 0d 09 09 54 52 59 |ilInfo f|i;...TRY|
|00001930| 28 66 69 29 0d 09 09 7b | 0d 09 09 09 53 65 74 48 |(fi)...{|....SetH|
|00001940| 61 6e 64 6c 65 53 69 7a | 65 28 72 73 72 63 2c 20 |andleSiz|e(rsrc, |
|00001950| 73 69 7a 65 29 3b 0d 09 | 09 09 46 61 69 6c 4d 65 |size);..|..FailMe|
|00001960| 6d 45 72 72 6f 72 28 29 | 3b 0d 09 09 09 48 4c 6f |mError()|;....HLo|
|00001970| 63 6b 28 72 73 72 63 29 | 3b 0d 09 09 09 54 48 52 |ck(rsrc)|;....THR|
|00001980| 4f 57 49 46 4f 53 45 52 | 52 28 41 45 47 65 74 50 |OWIFOSER|R(AEGetP|
|00001990| 61 72 61 6d 50 74 72 28 | 6d 65 73 73 61 67 65 2c |aramPtr(|message,|
|000019a0| 20 27 44 41 54 41 27 2c | 20 27 64 61 74 61 27 2c | 'DATA',| 'data',|
|000019b0| 20 61 63 74 75 61 6c 4d | 73 67 54 79 70 65 2c 20 | actualM|sgType, |
|000019c0| 2a 72 73 72 63 2c 20 73 | 69 7a 65 2c 20 73 69 7a |*rsrc, s|ize, siz|
|000019d0| 65 29 29 3b 0d 09 09 09 | 48 55 6e 6c 6f 63 6b 28 |e));....|HUnlock(|
|000019e0| 72 73 72 63 29 3b 0d 09 | 09 09 43 68 61 6e 67 65 |rsrc);..|..Change|
|000019f0| 64 52 65 73 6f 75 72 63 | 65 28 72 73 72 63 29 3b |dResourc|e(rsrc);|
|00001a00| 0d 09 09 09 54 48 52 4f | 57 49 46 52 45 53 45 52 |....THRO|WIFRESER|
|00001a10| 52 4f 52 28 29 3b 0d 09 | 09 09 66 69 2e 53 75 63 |ROR();..|..fi.Suc|
|00001a20| 63 65 73 73 28 29 3b 0d | 09 09 7d 0d 09 09 65 6c |cess();.|..}...el|
|00001a30| 73 65 0d 09 09 09 65 72 | 72 6f 72 20 3d 20 66 69 |se....er|ror = fi|
|00001a40| 2e 65 72 72 6f 72 3b 0d | 09 7d 0d 09 54 48 52 4f |.error;.|.}..THRO|
|00001a50| 57 49 46 4f 53 45 52 52 | 28 41 45 50 75 74 50 61 |WIFOSERR|(AEPutPa|
|00001a60| 72 61 6d 50 74 72 28 72 | 65 70 6c 79 2c 20 6b 65 |ramPtr(r|eply, ke|
|00001a70| 79 45 72 72 6f 72 4e 75 | 6d 62 65 72 2c 20 74 79 |yErrorNu|mber, ty|
|00001a80| 70 65 53 68 6f 72 74 49 | 6e 74 65 67 65 72 2c 20 |peShortI|nteger, |
|00001a90| 28 50 74 72 29 20 26 65 | 72 72 6f 72 2c 20 73 69 |(Ptr) &e|rror, si|
|00001aa0| 7a 65 6f 66 28 65 72 72 | 6f 72 29 29 29 3b 0d 7d |zeof(err|or)));.}|
|00001ab0| 0d 0d 0d 2f 2f 09 48 61 | 6e 64 6c 65 20 74 68 65 |...//.Ha|ndle the|
|00001ac0| 20 72 65 6d 6f 76 65 20 | 72 65 73 6f 75 72 63 65 | remove |resource|
|00001ad0| 20 41 70 70 6c 65 45 76 | 65 6e 74 2e 0d 2f 2f 0d | AppleEv|ent..//.|
|00001ae0| 2f 2f 09 6d 65 73 73 61 | 67 65 3a 09 09 74 68 65 |//.messa|ge:..the|
|00001af0| 20 41 70 70 6c 65 45 76 | 65 6e 74 0d 2f 2f 09 72 | AppleEv|ent.//.r|
|00001b00| 65 70 6c 79 3a 09 09 09 | 74 68 65 20 72 65 70 6c |eply:...|the repl|
|00001b10| 79 20 41 70 70 6c 65 45 | 76 65 6e 74 0d 2f 2f 0d |y AppleE|vent.//.|
|00001b20| 76 6f 69 64 20 54 41 64 | 4c 69 62 4c 69 6e 6b 3a |void TAd|LibLink:|
|00001b30| 3a 52 65 6d 6f 76 65 28 | 63 6f 6e 73 74 20 41 70 |:Remove(|const Ap|
|00001b40| 70 6c 65 45 76 65 6e 74 | 26 20 6d 65 73 73 61 67 |pleEvent|& messag|
|00001b50| 65 2c 20 63 6f 6e 73 74 | 20 41 70 70 6c 65 45 76 |e, const| AppleEv|
|00001b60| 65 6e 74 26 20 72 65 70 | 6c 79 29 0d 7b 0d 09 73 |ent& rep|ly).{..s|
|00001b70| 68 6f 72 74 20 69 64 3b | 0d 09 52 65 73 54 79 70 |hort id;|..ResTyp|
|00001b80| 65 20 74 79 70 65 3b 0d | 09 44 65 73 63 54 79 70 |e type;.|.DescTyp|
|00001b90| 65 20 61 63 74 75 61 6c | 4d 73 67 54 79 70 65 3b |e actual|MsgType;|
|00001ba0| 0d 09 53 69 7a 65 20 73 | 69 7a 65 3b 0d 09 4f 53 |..Size s|ize;..OS|
|00001bb0| 45 72 72 20 65 72 72 6f | 72 3b 0d 0d 09 54 48 52 |Err erro|r;...THR|
|00001bc0| 4f 57 49 46 4f 53 45 52 | 52 28 41 45 47 65 74 50 |OWIFOSER|R(AEGetP|
|00001bd0| 61 72 61 6d 50 74 72 28 | 6d 65 73 73 61 67 65 2c |aramPtr(|message,|
|00001be0| 20 27 52 54 59 50 27 2c | 20 27 52 53 52 43 27 2c | 'RTYP',| 'RSRC',|
|00001bf0| 20 61 63 74 75 61 6c 4d | 73 67 54 79 70 65 2c 20 | actualM|sgType, |
|00001c00| 28 50 74 72 29 20 26 74 | 79 70 65 2c 20 73 69 7a |(Ptr) &t|ype, siz|
|00001c10| 65 6f 66 28 74 79 70 65 | 29 2c 20 73 69 7a 65 29 |eof(type|), size)|
|00001c20| 29 3b 0d 09 54 48 52 4f | 57 49 46 4f 53 45 52 52 |);..THRO|WIFOSERR|
|00001c30| 28 41 45 47 65 74 50 61 | 72 61 6d 50 74 72 28 6d |(AEGetPa|ramPtr(m|
|00001c40| 65 73 73 61 67 65 2c 20 | 27 52 49 44 20 27 2c 20 |essage, |'RID ', |
|00001c50| 74 79 70 65 53 68 6f 72 | 74 49 6e 74 65 67 65 72 |typeShor|tInteger|
|00001c60| 2c 20 61 63 74 75 61 6c | 4d 73 67 54 79 70 65 2c |, actual|MsgType,|
|00001c70| 20 28 50 74 72 29 20 26 | 69 64 2c 20 73 69 7a 65 | (Ptr) &|id, size|
|00001c80| 6f 66 28 69 64 29 2c 20 | 73 69 7a 65 29 29 3b 0d |of(id), |size));.|
|00001c90| 0d 09 73 68 6f 72 74 20 | 63 75 72 52 73 72 63 46 |..short |curRsrcF|
|00001ca0| 69 6c 65 20 3d 20 55 53 | 45 52 45 53 46 49 4c 45 |ile = US|ERESFILE|
|00001cb0| 28 67 41 70 70 6c 69 63 | 61 74 69 6f 6e 52 65 66 |(gApplic|ationRef|
|00001cc0| 4e 75 6d 29 3b 0d 09 42 | 6f 6f 6c 65 61 6e 20 63 |Num);..B|oolean c|
|00001cd0| 75 72 52 65 73 4c 6f 61 | 64 20 3d 20 4c 4d 47 65 |urResLoa|d = LMGe|
|00001ce0| 74 52 65 73 4c 6f 61 64 | 28 29 3b 0d 09 53 65 74 |tResLoad|();..Set|
|00001cf0| 52 65 73 4c 6f 61 64 28 | 46 41 4c 53 45 29 3b 0d |ResLoad(|FALSE);.|
|00001d00| 09 48 61 6e 64 6c 65 20 | 72 73 72 63 20 3d 20 47 |.Handle |rsrc = G|
|00001d10| 65 74 31 52 65 73 6f 75 | 72 63 65 28 74 79 70 65 |et1Resou|rce(type|
|00001d20| 2c 20 69 64 29 3b 0d 09 | 65 72 72 6f 72 20 3d 20 |, id);..|error = |
|00001d30| 52 65 73 45 72 72 6f 72 | 28 29 3b 0d 09 53 65 74 |ResError|();..Set|
|00001d40| 52 65 73 4c 6f 61 64 28 | 63 75 72 52 65 73 4c 6f |ResLoad(|curResLo|
|00001d50| 61 64 29 3b 0d 09 69 66 | 20 28 65 72 72 6f 72 20 |ad);..if| (error |
|00001d60| 3d 3d 20 6e 6f 45 72 72 | 29 0d 09 7b 0d 09 09 52 |== noErr|)..{...R|
|00001d70| 65 6d 6f 76 65 52 65 73 | 6f 75 72 63 65 28 72 73 |emoveRes|ource(rs|
|00001d80| 72 63 29 3b 0d 09 09 65 | 72 72 6f 72 20 3d 20 52 |rc);...e|rror = R|
|00001d90| 65 73 45 72 72 6f 72 28 | 29 3b 0d 09 7d 0d 09 55 |esError(|);..}..U|
|00001da0| 53 45 52 45 53 46 49 4c | 45 28 63 75 72 52 73 72 |SERESFIL|E(curRsr|
|00001db0| 63 46 69 6c 65 29 3b 0d | 09 54 48 52 4f 57 49 46 |cFile);.|.THROWIF|
|00001dc0| 4f 53 45 52 52 28 41 45 | 50 75 74 50 61 72 61 6d |OSERR(AE|PutParam|
|00001dd0| 50 74 72 28 72 65 70 6c | 79 2c 20 6b 65 79 45 72 |Ptr(repl|y, keyEr|
|00001de0| 72 6f 72 4e 75 6d 62 65 | 72 2c 20 74 79 70 65 53 |rorNumbe|r, typeS|
|00001df0| 68 6f 72 74 49 6e 74 65 | 67 65 72 2c 20 28 50 74 |hortInte|ger, (Pt|
|00001e00| 72 29 20 26 65 72 72 6f | 72 2c 20 73 69 7a 65 6f |r) &erro|r, sizeo|
|00001e10| 66 28 65 72 72 6f 72 29 | 29 29 3b 0d 7d 0d 0d 0d |f(error)|));.}...|
|00001e20| 2f 2f 09 48 61 6e 64 6c | 65 20 74 68 65 20 73 65 |//.Handl|e the se|
|00001e30| 74 20 72 65 73 6f 75 72 | 63 65 20 69 6e 66 6f 20 |t resour|ce info |
|00001e40| 41 70 70 6c 65 45 76 65 | 6e 74 2e 0d 2f 2f 0d 2f |AppleEve|nt..//./|
|00001e50| 2f 09 6d 65 73 73 61 67 | 65 3a 09 09 74 68 65 20 |/.messag|e:..the |
|00001e60| 41 70 70 6c 65 45 76 65 | 6e 74 0d 2f 2f 09 72 65 |AppleEve|nt.//.re|
|00001e70| 70 6c 79 3a 09 09 09 74 | 68 65 20 72 65 70 6c 79 |ply:...t|he reply|
|00001e80| 20 41 70 70 6c 65 45 76 | 65 6e 74 0d 2f 2f 0d 76 | AppleEv|ent.//.v|
|00001e90| 6f 69 64 20 54 41 64 4c | 69 62 4c 69 6e 6b 3a 3a |oid TAdL|ibLink::|
|00001ea0| 53 65 74 28 63 6f 6e 73 | 74 20 41 70 70 6c 65 45 |Set(cons|t AppleE|
|00001eb0| 76 65 6e 74 26 20 6d 65 | 73 73 61 67 65 2c 20 63 |vent& me|ssage, c|
|00001ec0| 6f 6e 73 74 20 41 70 70 | 6c 65 45 76 65 6e 74 26 |onst App|leEvent&|
|00001ed0| 20 72 65 70 6c 79 29 0d | 7b 0d 09 73 68 6f 72 74 | reply).|{..short|
|00001ee0| 20 6f 6c 64 49 44 2c 20 | 6e 65 77 49 44 3b 0d 09 | oldID, |newID;..|
|00001ef0| 52 65 73 54 79 70 65 20 | 74 79 70 65 3b 0d 09 43 |ResType |type;..C|
|00001f00| 53 74 72 32 35 35 20 6e | 61 6d 65 3b 0d 09 44 65 |Str255 n|ame;..De|
|00001f10| 73 63 54 79 70 65 20 61 | 63 74 75 61 6c 4d 73 67 |scType a|ctualMsg|
|00001f20| 54 79 70 65 3b 0d 09 53 | 69 7a 65 20 73 69 7a 65 |Type;..S|ize size|
|00001f30| 3b 0d 09 4f 53 45 72 72 | 20 65 72 72 6f 72 3b 0d |;..OSErr| error;.|
|00001f40| 0d 09 54 48 52 4f 57 49 | 46 4f 53 45 52 52 28 41 |..THROWI|FOSERR(A|
|00001f50| 45 47 65 74 50 61 72 61 | 6d 50 74 72 28 6d 65 73 |EGetPara|mPtr(mes|
|00001f60| 73 61 67 65 2c 20 27 52 | 54 59 50 27 2c 20 27 52 |sage, 'R|TYP', 'R|
|00001f70| 53 52 43 27 2c 20 61 63 | 74 75 61 6c 4d 73 67 54 |SRC', ac|tualMsgT|
|00001f80| 79 70 65 2c 20 28 50 74 | 72 29 20 26 74 79 70 65 |ype, (Pt|r) &type|
|00001f90| 2c 20 73 69 7a 65 6f 66 | 28 74 79 70 65 29 2c 20 |, sizeof|(type), |
|00001fa0| 73 69 7a 65 29 29 3b 0d | 09 54 48 52 4f 57 49 46 |size));.|.THROWIF|
|00001fb0| 4f 53 45 52 52 28 41 45 | 47 65 74 50 61 72 61 6d |OSERR(AE|GetParam|
|00001fc0| 50 74 72 28 6d 65 73 73 | 61 67 65 2c 20 27 52 49 |Ptr(mess|age, 'RI|
|00001fd0| 44 20 27 2c 20 74 79 70 | 65 53 68 6f 72 74 49 6e |D ', typ|eShortIn|
|00001fe0| 74 65 67 65 72 2c 20 61 | 63 74 75 61 6c 4d 73 67 |teger, a|ctualMsg|
|00001ff0| 54 79 70 65 2c 20 28 50 | 74 72 29 20 26 6f 6c 64 |Type, (P|tr) &old|
|00002000| 49 44 2c 20 73 69 7a 65 | 6f 66 28 6f 6c 64 49 44 |ID, size|of(oldID|
|00002010| 29 2c 20 73 69 7a 65 29 | 29 3b 0d 09 54 48 52 4f |), size)|);..THRO|
|00002020| 57 49 46 4f 53 45 52 52 | 28 41 45 47 65 74 50 61 |WIFOSERR|(AEGetPa|
|00002030| 72 61 6d 50 74 72 28 6d | 65 73 73 61 67 65 2c 20 |ramPtr(m|essage, |
|00002040| 27 49 44 20 20 27 2c 20 | 74 79 70 65 53 68 6f 72 |'ID ', |typeShor|
|00002050| 74 49 6e 74 65 67 65 72 | 2c 20 61 63 74 75 61 6c |tInteger|, actual|
|00002060| 4d 73 67 54 79 70 65 2c | 20 28 50 74 72 29 20 26 |MsgType,| (Ptr) &|
|00002070| 6e 65 77 49 44 2c 20 73 | 69 7a 65 6f 66 28 6e 65 |newID, s|izeof(ne|
|00002080| 77 49 44 29 2c 20 73 69 | 7a 65 29 29 3b 0d 09 54 |wID), si|ze));..T|
|00002090| 48 52 4f 57 49 46 4f 53 | 45 52 52 28 41 45 47 65 |HROWIFOS|ERR(AEGe|
|000020a0| 74 50 61 72 61 6d 50 74 | 72 28 6d 65 73 73 61 67 |tParamPt|r(messag|
|000020b0| 65 2c 20 27 4e 41 4d 45 | 27 2c 20 74 79 70 65 43 |e, 'NAME|', typeC|
|000020c0| 68 61 72 2c 20 61 63 74 | 75 61 6c 4d 73 67 54 79 |har, act|ualMsgTy|
|000020d0| 70 65 2c 20 28 50 74 72 | 29 20 26 6e 61 6d 65 5b |pe, (Ptr|) &name[|
|000020e0| 31 5d 2c 20 73 69 7a 65 | 6f 66 28 6e 61 6d 65 29 |1], size|of(name)|
|000020f0| 20 2d 20 31 2c 20 73 69 | 7a 65 29 29 3b 0d 09 6e | - 1, si|ze));..n|
|00002100| 61 6d 65 2e 4c 65 6e 67 | 74 68 28 29 20 3d 20 28 |ame.Leng|th() = (|
|00002110| 63 68 61 72 29 20 73 69 | 7a 65 3b 0d 0d 09 73 68 |char) si|ze;...sh|
|00002120| 6f 72 74 20 63 75 72 52 | 73 72 63 46 69 6c 65 20 |ort curR|srcFile |
|00002130| 3d 20 55 53 45 52 45 53 | 46 49 4c 45 28 67 41 70 |= USERES|FILE(gAp|
|00002140| 70 6c 69 63 61 74 69 6f | 6e 52 65 66 4e 75 6d 29 |plicatio|nRefNum)|
|00002150| 3b 0d 09 42 6f 6f 6c 65 | 61 6e 20 63 75 72 52 65 |;..Boole|an curRe|
|00002160| 73 4c 6f 61 64 20 3d 20 | 4c 4d 47 65 74 52 65 73 |sLoad = |LMGetRes|
|00002170| 4c 6f 61 64 28 29 3b 0d | 09 53 65 74 52 65 73 4c |Load();.|.SetResL|
|00002180| 6f 61 64 28 46 41 4c 53 | 45 29 3b 0d 09 48 61 6e |oad(FALS|E);..Han|
|00002190| 64 6c 65 20 72 73 72 63 | 20 3d 20 47 65 74 31 52 |dle rsrc| = Get1R|
|000021a0| 65 73 6f 75 72 63 65 28 | 74 79 70 65 2c 20 6f 6c |esource(|type, ol|
|000021b0| 64 49 44 29 3b 0d 09 65 | 72 72 6f 72 20 3d 20 52 |dID);..e|rror = R|
|000021c0| 65 73 45 72 72 6f 72 28 | 29 3b 0d 09 53 65 74 52 |esError(|);..SetR|
|000021d0| 65 73 4c 6f 61 64 28 63 | 75 72 52 65 73 4c 6f 61 |esLoad(c|urResLoa|
|000021e0| 64 29 3b 0d 09 69 66 20 | 28 65 72 72 6f 72 20 3d |d);..if |(error =|
|000021f0| 3d 20 6e 6f 45 72 72 29 | 0d 09 7b 0d 09 09 53 65 |= noErr)|..{...Se|
|00002200| 74 52 65 73 49 6e 66 6f | 28 72 73 72 63 2c 20 6e |tResInfo|(rsrc, n|
|00002210| 65 77 49 44 2c 20 6e 61 | 6d 65 29 3b 0d 09 09 65 |ewID, na|me);...e|
|00002220| 72 72 6f 72 20 3d 20 52 | 65 73 45 72 72 6f 72 28 |rror = R|esError(|
|00002230| 29 3b 0d 09 7d 0d 09 55 | 53 45 52 45 53 46 49 4c |);..}..U|SERESFIL|
|00002240| 45 28 63 75 72 52 73 72 | 63 46 69 6c 65 29 3b 0d |E(curRsr|cFile);.|
|00002250| 09 54 48 52 4f 57 49 46 | 4f 53 45 52 52 28 41 45 |.THROWIF|OSERR(AE|
|00002260| 50 75 74 50 61 72 61 6d | 50 74 72 28 72 65 70 6c |PutParam|Ptr(repl|
|00002270| 79 2c 20 6b 65 79 45 72 | 72 6f 72 4e 75 6d 62 65 |y, keyEr|rorNumbe|
|00002280| 72 2c 20 74 79 70 65 53 | 68 6f 72 74 49 6e 74 65 |r, typeS|hortInte|
|00002290| 67 65 72 2c 20 28 50 74 | 72 29 20 26 65 72 72 6f |ger, (Pt|r) &erro|
|000022a0| 72 2c 20 73 69 7a 65 6f | 66 28 65 72 72 6f 72 29 |r, sizeo|f(error)|
|000022b0| 29 29 3b 0d 7d 0d 0d 23 | 65 6c 73 65 0d 0d 2f 2f |));.}..#|else..//|
|000022c0| 09 48 61 6e 64 6c 65 20 | 74 68 65 20 61 64 64 20 |.Handle |the add |
|000022d0| 72 65 73 6f 75 72 63 65 | 20 41 70 70 6c 65 45 76 |resource| AppleEv|
|000022e0| 65 6e 74 2e 0d 2f 2f 0d | 2f 2f 09 6d 65 73 73 61 |ent..//.|//.messa|
|000022f0| 67 65 3a 09 09 74 68 65 | 20 41 70 70 6c 65 45 76 |ge:..the| AppleEv|
|00002300| 65 6e 74 0d 2f 2f 09 72 | 65 70 6c 79 3a 09 09 09 |ent.//.r|eply:...|
|00002310| 74 68 65 20 72 65 70 6c | 79 20 41 70 70 6c 65 45 |the repl|y AppleE|
|00002320| 76 65 6e 74 0d 2f 2f 0d | 76 6f 69 64 20 54 41 64 |vent.//.|void TAd|
|00002330| 4c 69 62 4c 69 6e 6b 3a | 3a 41 64 64 28 63 6f 6e |LibLink:|:Add(con|
|00002340| 73 74 20 41 70 70 6c 65 | 45 76 65 6e 74 26 20 6d |st Apple|Event& m|
|00002350| 65 73 73 61 67 65 2c 20 | 41 70 70 6c 65 45 76 65 |essage, |AppleEve|
|00002360| 6e 74 26 20 72 65 70 6c | 79 29 0d 7b 0d 09 73 68 |nt& repl|y).{..sh|
|00002370| 6f 72 74 20 69 64 2c 20 | 61 74 74 72 69 62 75 74 |ort id, |attribut|
|00002380| 65 73 3b 0d 09 52 65 73 | 54 79 70 65 20 74 79 70 |es;..Res|Type typ|
|00002390| 65 3b 0d 09 44 65 73 63 | 54 79 70 65 20 61 63 74 |e;..Desc|Type act|
|000023a0| 75 61 6c 4d 73 67 54 79 | 70 65 3b 0d 09 53 69 7a |ualMsgTy|pe;..Siz|
|000023b0| 65 20 73 69 7a 65 3b 0d | 0d 09 54 48 52 4f 57 49 |e size;.|..THROWI|
|000023c0| 46 4f 53 45 52 52 28 41 | 45 47 65 74 50 61 72 61 |FOSERR(A|EGetPara|
|000023d0| 6d 50 74 72 28 26 6d 65 | 73 73 61 67 65 2c 20 27 |mPtr(&me|ssage, '|
|000023e0| 52 54 59 50 27 2c 20 27 | 52 53 52 43 27 2c 20 26 |RTYP', '|RSRC', &|
|000023f0| 61 63 74 75 61 6c 4d 73 | 67 54 79 70 65 2c 20 26 |actualMs|gType, &|
|00002400| 74 79 70 65 2c 20 73 69 | 7a 65 6f 66 28 74 79 70 |type, si|zeof(typ|
|00002410| 65 29 2c 20 26 73 69 7a | 65 29 29 3b 0d 09 54 48 |e), &siz|e));..TH|
|00002420| 52 4f 57 49 46 4f 53 45 | 52 52 28 41 45 47 65 74 |ROWIFOSE|RR(AEGet|
|00002430| 50 61 72 61 6d 50 74 72 | 28 26 6d 65 73 73 61 67 |ParamPtr|(&messag|
|00002440| 65 2c 20 27 52 49 44 20 | 27 2c 20 74 79 70 65 53 |e, 'RID |', typeS|
|00002450| 68 6f 72 74 49 6e 74 65 | 67 65 72 2c 20 26 61 63 |hortInte|ger, &ac|
|00002460| 74 75 61 6c 4d 73 67 54 | 79 70 65 2c 20 26 69 64 |tualMsgT|ype, &id|
|00002470| 2c 20 73 69 7a 65 6f 66 | 28 69 64 29 2c 20 26 73 |, sizeof|(id), &s|
|00002480| 69 7a 65 29 29 3b 0d 09 | 4f 53 45 72 72 20 65 72 |ize));..|OSErr er|
|00002490| 72 6f 72 20 3d 20 41 45 | 47 65 74 50 61 72 61 6d |ror = AE|GetParam|
|000024a0| 50 74 72 28 26 6d 65 73 | 73 61 67 65 2c 20 27 41 |Ptr(&mes|sage, 'A|
|000024b0| 54 54 52 27 2c 20 74 79 | 70 65 53 68 6f 72 74 49 |TTR', ty|peShortI|
|000024c0| 6e 74 65 67 65 72 2c 20 | 26 61 63 74 75 61 6c 4d |nteger, |&actualM|
|000024d0| 73 67 54 79 70 65 2c 20 | 26 61 74 74 72 69 62 75 |sgType, |&attribu|
|000024e0| 74 65 73 2c 20 73 69 7a | 65 6f 66 28 69 64 29 2c |tes, siz|eof(id),|
|000024f0| 20 26 73 69 7a 65 29 3b | 0d 09 42 6f 6f 6c 65 61 | &size);|..Boolea|
|00002500| 6e 20 73 65 74 41 74 74 | 72 69 62 75 74 65 73 20 |n setAtt|ributes |
|00002510| 3d 20 28 65 72 72 6f 72 | 20 3d 3d 20 6e 6f 45 72 |= (error| == noEr|
|00002520| 72 29 3b 0d 09 69 66 20 | 28 65 72 72 6f 72 20 3d |r);..if |(error =|
|00002530| 3d 20 65 72 72 41 45 44 | 65 73 63 4e 6f 74 46 6f |= errAED|escNotFo|
|00002540| 75 6e 64 29 0d 09 09 65 | 72 72 6f 72 20 3d 20 6e |und)...e|rror = n|
|00002550| 6f 45 72 72 3b 0d 09 54 | 48 52 4f 57 49 46 4f 53 |oErr;..T|HROWIFOS|
|00002560| 45 52 52 28 65 72 72 6f | 72 29 3b 0d 09 54 48 52 |ERR(erro|r);..THR|
|00002570| 4f 57 49 46 4f 53 45 52 | 52 28 41 45 53 69 7a 65 |OWIFOSER|R(AESize|
|00002580| 4f 66 50 61 72 61 6d 28 | 26 6d 65 73 73 61 67 65 |OfParam(|&message|
|00002590| 2c 20 27 44 41 54 41 27 | 2c 20 26 61 63 74 75 61 |, 'DATA'|, &actua|
|000025a0| 6c 4d 73 67 54 79 70 65 | 2c 20 26 73 69 7a 65 29 |lMsgType|, &size)|
|000025b0| 29 3b 0d 0d 09 69 66 20 | 28 73 69 7a 65 20 3e 20 |);...if |(size > |
|000025c0| 30 29 0d 09 7b 0d 09 09 | 4d 41 56 6f 6c 61 74 69 |0)..{...|MAVolati|
|000025d0| 6c 65 49 6e 69 74 28 48 | 61 6e 64 6c 65 2c 20 64 |leInit(H|andle, d|
|000025e0| 61 74 61 2c 20 4e 55 4c | 4c 29 3b 0d 23 69 66 20 |ata, NUL|L);.#if |
|000025f0| 71 4d 61 63 41 70 70 56 | 65 72 73 69 6f 6e 20 3c |qMacAppV|ersion <|
|00002600| 3d 20 33 33 0d 09 09 46 | 61 69 6c 49 6e 66 6f 20 |= 33...F|ailInfo |
|00002610| 66 69 3b 0d 09 09 54 52 | 59 28 66 69 29 0d 23 65 |fi;...TR|Y(fi).#e|
|00002620| 6c 73 65 0d 09 09 74 72 | 79 0d 23 65 6e 64 69 66 |lse...tr|y.#endif|
|00002630| 0d 09 09 7b 0d 09 09 09 | 64 61 74 61 20 3d 20 4e |...{....|data = N|
|00002640| 65 77 50 65 72 6d 48 61 | 6e 64 6c 65 28 73 69 7a |ewPermHa|ndle(siz|
|00002650| 65 29 3b 0d 09 09 09 48 | 4c 6f 63 6b 28 64 61 74 |e);....H|Lock(dat|
|00002660| 61 29 3b 0d 09 09 09 54 | 48 52 4f 57 49 46 4f 53 |a);....T|HROWIFOS|
|00002670| 45 52 52 28 41 45 47 65 | 74 50 61 72 61 6d 50 74 |ERR(AEGe|tParamPt|
|00002680| 72 28 26 6d 65 73 73 61 | 67 65 2c 20 27 44 41 54 |r(&messa|ge, 'DAT|
|00002690| 41 27 2c 20 27 64 61 74 | 61 27 2c 20 26 61 63 74 |A', 'dat|a', &act|
|000026a0| 75 61 6c 4d 73 67 54 79 | 70 65 2c 20 2a 64 61 74 |ualMsgTy|pe, *dat|
|000026b0| 61 2c 20 73 69 7a 65 2c | 20 26 73 69 7a 65 29 29 |a, size,| &size))|
|000026c0| 3b 0d 09 09 09 48 55 6e | 6c 6f 63 6b 28 64 61 74 |;....HUn|lock(dat|
|000026d0| 61 29 3b 0d 09 09 09 73 | 68 6f 72 74 20 63 75 72 |a);....s|hort cur|
|000026e0| 52 73 72 63 46 69 6c 65 | 20 3d 20 55 53 45 52 45 |RsrcFile| = USERE|
|000026f0| 53 46 49 4c 45 28 67 41 | 70 70 6c 69 63 61 74 69 |SFILE(gA|pplicati|
|00002700| 6f 6e 52 65 66 4e 75 6d | 29 3b 0d 09 09 09 41 64 |onRefNum|);....Ad|
|00002710| 64 52 65 73 6f 75 72 63 | 65 28 64 61 74 61 2c 20 |dResourc|e(data, |
|00002720| 74 79 70 65 2c 20 69 64 | 2c 20 67 45 6d 70 74 79 |type, id|, gEmpty|
|00002730| 53 74 72 69 6e 67 29 3b | 0d 09 09 09 65 72 72 6f |String);|....erro|
|00002740| 72 20 3d 20 52 65 73 45 | 72 72 6f 72 28 29 3b 0d |r = ResE|rror();.|
|00002750| 09 09 09 55 53 45 52 45 | 53 46 49 4c 45 28 63 75 |...USERE|SFILE(cu|
|00002760| 72 52 73 72 63 46 69 6c | 65 29 3b 0d 09 09 09 54 |rRsrcFil|e);....T|
|00002770| 48 52 4f 57 49 46 4f 53 | 45 52 52 28 65 72 72 6f |HROWIFOS|ERR(erro|
|00002780| 72 29 3b 0d 09 09 09 69 | 66 20 28 73 65 74 41 74 |r);....i|f (setAt|
|00002790| 74 72 69 62 75 74 65 73 | 29 0d 09 09 09 7b 0d 09 |tributes|)....{..|
|000027a0| 09 09 09 53 65 74 52 65 | 73 41 74 74 72 73 28 64 |...SetRe|sAttrs(d|
|000027b0| 61 74 61 2c 20 61 74 74 | 72 69 62 75 74 65 73 29 |ata, att|ributes)|
|000027c0| 3b 0d 09 09 09 09 54 48 | 52 4f 57 49 46 52 45 53 |;.....TH|ROWIFRES|
|000027d0| 45 52 52 4f 52 28 29 3b | 0d 09 09 09 09 43 68 61 |ERROR();|.....Cha|
|000027e0| 6e 67 65 64 52 65 73 6f | 75 72 63 65 28 64 61 74 |ngedReso|urce(dat|
|000027f0| 61 29 3b 0d 09 09 09 09 | 54 48 52 4f 57 49 46 52 |a);.....|THROWIFR|
|00002800| 45 53 45 52 52 4f 52 28 | 29 3b 0d 09 09 09 7d 0d |ESERROR(|);....}.|
|00002810| 23 69 66 20 71 4d 61 63 | 41 70 70 56 65 72 73 69 |#if qMac|AppVersi|
|00002820| 6f 6e 20 3c 3d 20 33 33 | 0d 09 09 09 66 69 2e 53 |on <= 33|....fi.S|
|00002830| 75 63 63 65 73 73 28 29 | 3b 0d 23 65 6e 64 69 66 |uccess()|;.#endif|
|00002840| 0d 09 09 7d 0d 23 69 66 | 20 71 4d 61 63 41 70 70 |...}.#if| qMacApp|
|00002850| 56 65 72 73 69 6f 6e 20 | 3c 3d 20 33 33 0d 09 09 |Version |<= 33...|
|00002860| 65 6c 73 65 0d 23 65 6c | 73 65 0d 09 09 63 61 74 |else.#el|se...cat|
|00002870| 63 68 20 28 43 45 78 63 | 65 70 74 69 6f 6e 5f 41 |ch (CExc|eption_A|
|00002880| 43 26 20 74 68 65 45 78 | 63 65 70 74 69 6f 6e 29 |C& theEx|ception)|
|00002890| 0d 23 65 6e 64 69 66 0d | 09 09 7b 0d 09 09 09 44 |.#endif.|..{....D|
|000028a0| 49 53 50 4f 53 45 49 46 | 48 41 4e 44 4c 45 28 64 |ISPOSEIF|HANDLE(d|
|000028b0| 61 74 61 29 3b 0d 23 69 | 66 20 71 4d 61 63 41 70 |ata);.#i|f qMacAp|
|000028c0| 70 56 65 72 73 69 6f 6e | 20 3c 3d 20 33 33 0d 09 |pVersion| <= 33..|
|000028d0| 09 09 65 72 72 6f 72 20 | 3d 20 66 69 2e 65 72 72 |..error |= fi.err|
|000028e0| 6f 72 3b 0d 23 65 6c 73 | 65 0d 09 09 09 65 72 72 |or;.#els|e....err|
|000028f0| 6f 72 20 3d 20 74 68 65 | 45 78 63 65 70 74 69 6f |or = the|Exceptio|
|00002900| 6e 2e 47 65 74 45 72 72 | 6f 72 28 29 3b 0d 23 65 |n.GetErr|or();.#e|
|00002910| 6e 64 69 66 0d 09 09 7d | 0d 09 7d 0d 09 54 48 52 |ndif...}|..}..THR|
|00002920| 4f 57 49 46 4f 53 45 52 | 52 28 41 45 50 75 74 50 |OWIFOSER|R(AEPutP|
|00002930| 61 72 61 6d 50 74 72 28 | 26 72 65 70 6c 79 2c 20 |aramPtr(|&reply, |
|00002940| 6b 65 79 45 72 72 6f 72 | 4e 75 6d 62 65 72 2c 20 |keyError|Number, |
|00002950| 74 79 70 65 53 68 6f 72 | 74 49 6e 74 65 67 65 72 |typeShor|tInteger|
|00002960| 2c 20 26 65 72 72 6f 72 | 2c 20 73 69 7a 65 6f 66 |, &error|, sizeof|
|00002970| 28 65 72 72 6f 72 29 29 | 29 3b 0d 7d 0d 0d 0d 2f |(error))|);.}.../|
|00002980| 2f 09 48 61 6e 64 6c 65 | 20 74 68 65 20 63 68 61 |/.Handle| the cha|
|00002990| 6e 67 65 64 20 72 65 73 | 6f 75 72 63 65 20 41 70 |nged res|ource Ap|
|000029a0| 70 6c 65 45 76 65 6e 74 | 2e 0d 2f 2f 0d 2f 2f 09 |pleEvent|..//.//.|
|000029b0| 6d 65 73 73 61 67 65 3a | 09 09 74 68 65 20 41 70 |message:|..the Ap|
|000029c0| 70 6c 65 45 76 65 6e 74 | 0d 2f 2f 09 72 65 70 6c |pleEvent|.//.repl|
|000029d0| 79 3a 09 09 09 74 68 65 | 20 72 65 70 6c 79 20 41 |y:...the| reply A|
|000029e0| 70 70 6c 65 45 76 65 6e | 74 0d 2f 2f 0d 76 6f 69 |ppleEven|t.//.voi|
|000029f0| 64 20 54 41 64 4c 69 62 | 4c 69 6e 6b 3a 3a 43 68 |d TAdLib|Link::Ch|
|00002a00| 61 6e 67 65 28 63 6f 6e | 73 74 20 41 70 70 6c 65 |ange(con|st Apple|
|00002a10| 45 76 65 6e 74 26 20 6d | 65 73 73 61 67 65 2c 20 |Event& m|essage, |
|00002a20| 41 70 70 6c 65 45 76 65 | 6e 74 26 20 72 65 70 6c |AppleEve|nt& repl|
|00002a30| 79 29 0d 7b 0d 09 73 68 | 6f 72 74 20 69 64 3b 0d |y).{..sh|ort id;.|
|00002a40| 09 52 65 73 54 79 70 65 | 20 74 79 70 65 3b 0d 09 |.ResType| type;..|
|00002a50| 44 65 73 63 54 79 70 65 | 20 61 63 74 75 61 6c 4d |DescType| actualM|
|00002a60| 73 67 54 79 70 65 3b 0d | 09 53 69 7a 65 20 73 69 |sgType;.|.Size si|
|00002a70| 7a 65 3b 0d 09 4f 53 45 | 72 72 20 65 72 72 6f 72 |ze;..OSE|rr error|
|00002a80| 3b 0d 0d 09 54 48 52 4f | 57 49 46 4f 53 45 52 52 |;...THRO|WIFOSERR|
|00002a90| 28 41 45 47 65 74 50 61 | 72 61 6d 50 74 72 28 26 |(AEGetPa|ramPtr(&|
|00002aa0| 6d 65 73 73 61 67 65 2c | 20 27 52 54 59 50 27 2c |message,| 'RTYP',|
|00002ab0| 20 27 52 53 52 43 27 2c | 20 26 61 63 74 75 61 6c | 'RSRC',| &actual|
|00002ac0| 4d 73 67 54 79 70 65 2c | 20 26 74 79 70 65 2c 20 |MsgType,| &type, |
|00002ad0| 73 69 7a 65 6f 66 28 74 | 79 70 65 29 2c 20 26 73 |sizeof(t|ype), &s|
|00002ae0| 69 7a 65 29 29 3b 0d 09 | 54 48 52 4f 57 49 46 4f |ize));..|THROWIFO|
|00002af0| 53 45 52 52 28 41 45 47 | 65 74 50 61 72 61 6d 50 |SERR(AEG|etParamP|
|00002b00| 74 72 28 26 6d 65 73 73 | 61 67 65 2c 20 27 52 49 |tr(&mess|age, 'RI|
|00002b10| 44 20 27 2c 20 74 79 70 | 65 53 68 6f 72 74 49 6e |D ', typ|eShortIn|
|00002b20| 74 65 67 65 72 2c 20 26 | 61 63 74 75 61 6c 4d 73 |teger, &|actualMs|
|00002b30| 67 54 79 70 65 2c 20 26 | 69 64 2c 20 73 69 7a 65 |gType, &|id, size|
|00002b40| 6f 66 28 69 64 29 2c 20 | 26 73 69 7a 65 29 29 3b |of(id), |&size));|
|00002b50| 0d 09 54 48 52 4f 57 49 | 46 4f 53 45 52 52 28 41 |..THROWI|FOSERR(A|
|00002b60| 45 53 69 7a 65 4f 66 50 | 61 72 61 6d 28 26 6d 65 |ESizeOfP|aram(&me|
|00002b70| 73 73 61 67 65 2c 20 27 | 44 41 54 41 27 2c 20 26 |ssage, '|DATA', &|
|00002b80| 61 63 74 75 61 6c 4d 73 | 67 54 79 70 65 2c 20 26 |actualMs|gType, &|
|00002b90| 73 69 7a 65 29 29 3b 0d | 0d 09 73 68 6f 72 74 20 |size));.|..short |
|00002ba0| 63 75 72 52 73 72 63 46 | 69 6c 65 20 3d 20 55 53 |curRsrcF|ile = US|
|00002bb0| 45 52 45 53 46 49 4c 45 | 28 67 41 70 70 6c 69 63 |ERESFILE|(gApplic|
|00002bc0| 61 74 69 6f 6e 52 65 66 | 4e 75 6d 29 3b 0d 09 42 |ationRef|Num);..B|
|00002bd0| 6f 6f 6c 65 61 6e 20 6f | 6c 64 50 65 72 6d 20 3d |oolean o|ldPerm =|
|00002be0| 20 50 65 72 6d 41 6c 6c | 6f 63 61 74 69 6f 6e 28 | PermAll|ocation(|
|00002bf0| 54 52 55 45 29 3b 0d 09 | 48 61 6e 64 6c 65 20 72 |TRUE);..|Handle r|
|00002c00| 73 72 63 20 3d 20 47 65 | 74 31 52 65 73 6f 75 72 |src = Ge|t1Resour|
|00002c10| 63 65 28 74 79 70 65 2c | 20 69 64 29 3b 0d 09 65 |ce(type,| id);..e|
|00002c20| 72 72 6f 72 20 3d 20 52 | 65 73 45 72 72 6f 72 28 |rror = R|esError(|
|00002c30| 29 3b 0d 09 50 65 72 6d | 41 6c 6c 6f 63 61 74 69 |);..Perm|Allocati|
|00002c40| 6f 6e 28 6f 6c 64 50 65 | 72 6d 29 3b 0d 09 55 53 |on(oldPe|rm);..US|
|00002c50| 45 52 45 53 46 49 4c 45 | 28 63 75 72 52 73 72 63 |ERESFILE|(curRsrc|
|00002c60| 46 69 6c 65 29 3b 0d 09 | 69 66 20 28 65 72 72 6f |File);..|if (erro|
|00002c70| 72 20 3d 3d 20 6e 6f 45 | 72 72 29 0d 09 7b 0d 23 |r == noE|rr)..{.#|
|00002c80| 69 66 20 71 4d 61 63 41 | 70 70 56 65 72 73 69 6f |if qMacA|ppVersio|
|00002c90| 6e 20 3c 3d 20 33 33 0d | 09 09 46 61 69 6c 49 6e |n <= 33.|..FailIn|
|00002ca0| 66 6f 20 66 69 3b 0d 09 | 09 54 52 59 28 66 69 29 |fo fi;..|.TRY(fi)|
|00002cb0| 0d 23 65 6c 73 65 0d 09 | 09 74 72 79 0d 23 65 6e |.#else..|.try.#en|
|00002cc0| 64 69 66 0d 09 09 7b 0d | 09 09 09 53 65 74 48 61 |dif...{.|...SetHa|
|00002cd0| 6e 64 6c 65 53 69 7a 65 | 28 72 73 72 63 2c 20 73 |ndleSize|(rsrc, s|
|00002ce0| 69 7a 65 29 3b 0d 09 09 | 09 54 48 52 4f 57 49 46 |ize);...|.THROWIF|
|00002cf0| 4d 45 4d 45 52 52 4f 52 | 28 29 3b 0d 09 09 09 48 |MEMERROR|();....H|
|00002d00| 4c 6f 63 6b 28 72 73 72 | 63 29 3b 0d 09 09 09 54 |Lock(rsr|c);....T|
|00002d10| 48 52 4f 57 49 46 4f 53 | 45 52 52 28 41 45 47 65 |HROWIFOS|ERR(AEGe|
|00002d20| 74 50 61 72 61 6d 50 74 | 72 28 26 6d 65 73 73 61 |tParamPt|r(&messa|
|00002d30| 67 65 2c 20 27 44 41 54 | 41 27 2c 20 27 64 61 74 |ge, 'DAT|A', 'dat|
|00002d40| 61 27 2c 20 26 61 63 74 | 75 61 6c 4d 73 67 54 79 |a', &act|ualMsgTy|
|00002d50| 70 65 2c 20 2a 72 73 72 | 63 2c 20 73 69 7a 65 2c |pe, *rsr|c, size,|
|00002d60| 20 26 73 69 7a 65 29 29 | 3b 0d 09 09 09 48 55 6e | &size))|;....HUn|
|00002d70| 6c 6f 63 6b 28 72 73 72 | 63 29 3b 0d 09 09 09 43 |lock(rsr|c);....C|
|00002d80| 68 61 6e 67 65 64 52 65 | 73 6f 75 72 63 65 28 72 |hangedRe|source(r|
|00002d90| 73 72 63 29 3b 0d 09 09 | 09 54 48 52 4f 57 49 46 |src);...|.THROWIF|
|00002da0| 52 45 53 45 52 52 4f 52 | 28 29 3b 0d 23 69 66 20 |RESERROR|();.#if |
|00002db0| 71 4d 61 63 41 70 70 56 | 65 72 73 69 6f 6e 20 3c |qMacAppV|ersion <|
|00002dc0| 3d 20 33 33 0d 09 09 09 | 66 69 2e 53 75 63 63 65 |= 33....|fi.Succe|
|00002dd0| 73 73 28 29 3b 0d 23 65 | 6e 64 69 66 0d 09 09 7d |ss();.#e|ndif...}|
|00002de0| 0d 23 69 66 20 71 4d 61 | 63 41 70 70 56 65 72 73 |.#if qMa|cAppVers|
|00002df0| 69 6f 6e 20 3c 3d 20 33 | 33 0d 09 09 65 6c 73 65 |ion <= 3|3...else|
|00002e00| 0d 09 09 09 65 72 72 6f | 72 20 3d 20 66 69 2e 65 |....erro|r = fi.e|
|00002e10| 72 72 6f 72 3b 0d 23 65 | 6c 73 65 0d 09 09 63 61 |rror;.#e|lse...ca|
|00002e20| 74 63 68 20 28 43 45 78 | 63 65 70 74 69 6f 6e 5f |tch (CEx|ception_|
|00002e30| 41 43 26 20 74 68 65 45 | 78 63 65 70 74 69 6f 6e |AC& theE|xception|
|00002e40| 29 0d 09 09 7b 0d 09 09 | 09 65 72 72 6f 72 20 3d |)...{...|.error =|
|00002e50| 20 74 68 65 45 78 63 65 | 70 74 69 6f 6e 2e 47 65 | theExce|ption.Ge|
|00002e60| 74 45 72 72 6f 72 28 29 | 3b 0d 09 09 7d 0d 23 65 |tError()|;...}.#e|
|00002e70| 6e 64 69 66 0d 09 7d 0d | 09 54 48 52 4f 57 49 46 |ndif..}.|.THROWIF|
|00002e80| 4f 53 45 52 52 28 41 45 | 50 75 74 50 61 72 61 6d |OSERR(AE|PutParam|
|00002e90| 50 74 72 28 26 72 65 70 | 6c 79 2c 20 6b 65 79 45 |Ptr(&rep|ly, keyE|
|00002ea0| 72 72 6f 72 4e 75 6d 62 | 65 72 2c 20 74 79 70 65 |rrorNumb|er, type|
|00002eb0| 53 68 6f 72 74 49 6e 74 | 65 67 65 72 2c 20 26 65 |ShortInt|eger, &e|
|00002ec0| 72 72 6f 72 2c 20 73 69 | 7a 65 6f 66 28 65 72 72 |rror, si|zeof(err|
|00002ed0| 6f 72 29 29 29 3b 0d 7d | 0d 0d 0d 2f 2f 09 48 61 |or)));.}|...//.Ha|
|00002ee0| 6e 64 6c 65 20 74 68 65 | 20 72 65 6d 6f 76 65 20 |ndle the| remove |
|00002ef0| 72 65 73 6f 75 72 63 65 | 20 41 70 70 6c 65 45 76 |resource| AppleEv|
|00002f00| 65 6e 74 2e 0d 2f 2f 0d | 2f 2f 09 6d 65 73 73 61 |ent..//.|//.messa|
|00002f10| 67 65 3a 09 09 74 68 65 | 20 41 70 70 6c 65 45 76 |ge:..the| AppleEv|
|00002f20| 65 6e 74 0d 2f 2f 09 72 | 65 70 6c 79 3a 09 09 09 |ent.//.r|eply:...|
|00002f30| 74 68 65 20 72 65 70 6c | 79 20 41 70 70 6c 65 45 |the repl|y AppleE|
|00002f40| 76 65 6e 74 0d 2f 2f 0d | 76 6f 69 64 20 54 41 64 |vent.//.|void TAd|
|00002f50| 4c 69 62 4c 69 6e 6b 3a | 3a 52 65 6d 6f 76 65 28 |LibLink:|:Remove(|
|00002f60| 63 6f 6e 73 74 20 41 70 | 70 6c 65 45 76 65 6e 74 |const Ap|pleEvent|
|00002f70| 26 20 6d 65 73 73 61 67 | 65 2c 20 41 70 70 6c 65 |& messag|e, Apple|
|00002f80| 45 76 65 6e 74 26 20 72 | 65 70 6c 79 29 0d 7b 0d |Event& r|eply).{.|
|00002f90| 09 73 68 6f 72 74 20 69 | 64 3b 0d 09 52 65 73 54 |.short i|d;..ResT|
|00002fa0| 79 70 65 20 74 79 70 65 | 3b 0d 09 44 65 73 63 54 |ype type|;..DescT|
|00002fb0| 79 70 65 20 61 63 74 75 | 61 6c 4d 73 67 54 79 70 |ype actu|alMsgTyp|
|00002fc0| 65 3b 0d 09 53 69 7a 65 | 20 73 69 7a 65 3b 0d 09 |e;..Size| size;..|
|00002fd0| 4f 53 45 72 72 20 65 72 | 72 6f 72 3b 0d 0d 09 54 |OSErr er|ror;...T|
|00002fe0| 48 52 4f 57 49 46 4f 53 | 45 52 52 28 41 45 47 65 |HROWIFOS|ERR(AEGe|
|00002ff0| 74 50 61 72 61 6d 50 74 | 72 28 26 6d 65 73 73 61 |tParamPt|r(&messa|
|00003000| 67 65 2c 20 27 52 54 59 | 50 27 2c 20 27 52 53 52 |ge, 'RTY|P', 'RSR|
|00003010| 43 27 2c 20 26 61 63 74 | 75 61 6c 4d 73 67 54 79 |C', &act|ualMsgTy|
|00003020| 70 65 2c 20 26 74 79 70 | 65 2c 20 73 69 7a 65 6f |pe, &typ|e, sizeo|
|00003030| 66 28 74 79 70 65 29 2c | 20 26 73 69 7a 65 29 29 |f(type),| &size))|
|00003040| 3b 0d 09 54 48 52 4f 57 | 49 46 4f 53 45 52 52 28 |;..THROW|IFOSERR(|
|00003050| 41 45 47 65 74 50 61 72 | 61 6d 50 74 72 28 26 6d |AEGetPar|amPtr(&m|
|00003060| 65 73 73 61 67 65 2c 20 | 27 52 49 44 20 27 2c 20 |essage, |'RID ', |
|00003070| 74 79 70 65 53 68 6f 72 | 74 49 6e 74 65 67 65 72 |typeShor|tInteger|
|00003080| 2c 20 26 61 63 74 75 61 | 6c 4d 73 67 54 79 70 65 |, &actua|lMsgType|
|00003090| 2c 20 26 69 64 2c 20 73 | 69 7a 65 6f 66 28 69 64 |, &id, s|izeof(id|
|000030a0| 29 2c 20 26 73 69 7a 65 | 29 29 3b 0d 0d 09 73 68 |), &size|));...sh|
|000030b0| 6f 72 74 20 63 75 72 52 | 73 72 63 46 69 6c 65 20 |ort curR|srcFile |
|000030c0| 3d 20 55 53 45 52 45 53 | 46 49 4c 45 28 67 41 70 |= USERES|FILE(gAp|
|000030d0| 70 6c 69 63 61 74 69 6f | 6e 52 65 66 4e 75 6d 29 |plicatio|nRefNum)|
|000030e0| 3b 0d 09 42 6f 6f 6c 65 | 61 6e 20 63 75 72 52 65 |;..Boole|an curRe|
|000030f0| 73 4c 6f 61 64 20 3d 20 | 4c 4d 47 65 74 52 65 73 |sLoad = |LMGetRes|
|00003100| 4c 6f 61 64 28 29 3b 0d | 09 53 65 74 52 65 73 4c |Load();.|.SetResL|
|00003110| 6f 61 64 28 46 41 4c 53 | 45 29 3b 0d 09 48 61 6e |oad(FALS|E);..Han|
|00003120| 64 6c 65 20 72 73 72 63 | 20 3d 20 47 65 74 31 52 |dle rsrc| = Get1R|
|00003130| 65 73 6f 75 72 63 65 28 | 74 79 70 65 2c 20 69 64 |esource(|type, id|
|00003140| 29 3b 0d 09 65 72 72 6f | 72 20 3d 20 52 65 73 45 |);..erro|r = ResE|
|00003150| 72 72 6f 72 28 29 3b 0d | 09 53 65 74 52 65 73 4c |rror();.|.SetResL|
|00003160| 6f 61 64 28 63 75 72 52 | 65 73 4c 6f 61 64 29 3b |oad(curR|esLoad);|
|00003170| 0d 09 69 66 20 28 65 72 | 72 6f 72 20 3d 3d 20 6e |..if (er|ror == n|
|00003180| 6f 45 72 72 29 0d 09 7b | 0d 09 09 52 65 6d 6f 76 |oErr)..{|...Remov|
|00003190| 65 52 65 73 6f 75 72 63 | 65 28 72 73 72 63 29 3b |eResourc|e(rsrc);|
|000031a0| 0d 09 09 65 72 72 6f 72 | 20 3d 20 52 65 73 45 72 |...error| = ResEr|
|000031b0| 72 6f 72 28 29 3b 0d 09 | 7d 0d 09 55 53 45 52 45 |ror();..|}..USERE|
|000031c0| 53 46 49 4c 45 28 63 75 | 72 52 73 72 63 46 69 6c |SFILE(cu|rRsrcFil|
|000031d0| 65 29 3b 0d 09 54 48 52 | 4f 57 49 46 4f 53 45 52 |e);..THR|OWIFOSER|
|000031e0| 52 28 41 45 50 75 74 50 | 61 72 61 6d 50 74 72 28 |R(AEPutP|aramPtr(|
|000031f0| 26 72 65 70 6c 79 2c 20 | 6b 65 79 45 72 72 6f 72 |&reply, |keyError|
|00003200| 4e 75 6d 62 65 72 2c 20 | 74 79 70 65 53 68 6f 72 |Number, |typeShor|
|00003210| 74 49 6e 74 65 67 65 72 | 2c 20 28 50 74 72 29 20 |tInteger|, (Ptr) |
|00003220| 26 65 72 72 6f 72 2c 20 | 73 69 7a 65 6f 66 28 65 |&error, |sizeof(e|
|00003230| 72 72 6f 72 29 29 29 3b | 0d 7d 0d 0d 0d 2f 2f 09 |rror)));|.}...//.|
|00003240| 48 61 6e 64 6c 65 20 74 | 68 65 20 73 65 74 20 72 |Handle t|he set r|
|00003250| 65 73 6f 75 72 63 65 20 | 69 6e 66 6f 20 41 70 70 |esource |info App|
|00003260| 6c 65 45 76 65 6e 74 2e | 0d 2f 2f 0d 2f 2f 09 6d |leEvent.|.//.//.m|
|00003270| 65 73 73 61 67 65 3a 09 | 09 74 68 65 20 41 70 70 |essage:.|.the App|
|00003280| 6c 65 45 76 65 6e 74 0d | 2f 2f 09 72 65 70 6c 79 |leEvent.|//.reply|
|00003290| 3a 09 09 09 74 68 65 20 | 72 65 70 6c 79 20 41 70 |:...the |reply Ap|
|000032a0| 70 6c 65 45 76 65 6e 74 | 0d 2f 2f 0d 76 6f 69 64 |pleEvent|.//.void|
|000032b0| 20 54 41 64 4c 69 62 4c | 69 6e 6b 3a 3a 53 65 74 | TAdLibL|ink::Set|
|000032c0| 28 63 6f 6e 73 74 20 41 | 70 70 6c 65 45 76 65 6e |(const A|ppleEven|
|000032d0| 74 26 20 6d 65 73 73 61 | 67 65 2c 20 41 70 70 6c |t& messa|ge, Appl|
|000032e0| 65 45 76 65 6e 74 26 20 | 72 65 70 6c 79 29 0d 7b |eEvent& |reply).{|
|000032f0| 0d 09 73 68 6f 72 74 20 | 6f 6c 64 49 44 2c 20 6e |..short |oldID, n|
|00003300| 65 77 49 44 3b 0d 09 52 | 65 73 54 79 70 65 20 74 |ewID;..R|esType t|
|00003310| 79 70 65 3b 0d 09 43 53 | 54 52 32 35 35 20 6e 61 |ype;..CS|TR255 na|
|00003320| 6d 65 3b 0d 09 44 65 73 | 63 54 79 70 65 20 61 63 |me;..Des|cType ac|
|00003330| 74 75 61 6c 4d 73 67 54 | 79 70 65 3b 0d 09 53 69 |tualMsgT|ype;..Si|
|00003340| 7a 65 20 73 69 7a 65 3b | 0d 09 4f 53 45 72 72 20 |ze size;|..OSErr |
|00003350| 65 72 72 6f 72 3b 0d 0d | 09 54 48 52 4f 57 49 46 |error;..|.THROWIF|
|00003360| 4f 53 45 52 52 28 41 45 | 47 65 74 50 61 72 61 6d |OSERR(AE|GetParam|
|00003370| 50 74 72 28 26 6d 65 73 | 73 61 67 65 2c 20 27 52 |Ptr(&mes|sage, 'R|
|00003380| 54 59 50 27 2c 20 27 52 | 53 52 43 27 2c 20 26 61 |TYP', 'R|SRC', &a|
|00003390| 63 74 75 61 6c 4d 73 67 | 54 79 70 65 2c 20 26 74 |ctualMsg|Type, &t|
|000033a0| 79 70 65 2c 20 73 69 7a | 65 6f 66 28 74 79 70 65 |ype, siz|eof(type|
|000033b0| 29 2c 20 26 73 69 7a 65 | 29 29 3b 0d 09 54 48 52 |), &size|));..THR|
|000033c0| 4f 57 49 46 4f 53 45 52 | 52 28 41 45 47 65 74 50 |OWIFOSER|R(AEGetP|
|000033d0| 61 72 61 6d 50 74 72 28 | 26 6d 65 73 73 61 67 65 |aramPtr(|&message|
|000033e0| 2c 20 27 52 49 44 20 27 | 2c 20 74 79 70 65 53 68 |, 'RID '|, typeSh|
|000033f0| 6f 72 74 49 6e 74 65 67 | 65 72 2c 20 26 61 63 74 |ortInteg|er, &act|
|00003400| 75 61 6c 4d 73 67 54 79 | 70 65 2c 20 26 6f 6c 64 |ualMsgTy|pe, &old|
|00003410| 49 44 2c 20 73 69 7a 65 | 6f 66 28 6f 6c 64 49 44 |ID, size|of(oldID|
|00003420| 29 2c 20 26 73 69 7a 65 | 29 29 3b 0d 09 54 48 52 |), &size|));..THR|
|00003430| 4f 57 49 46 4f 53 45 52 | 52 28 41 45 47 65 74 50 |OWIFOSER|R(AEGetP|
|00003440| 61 72 61 6d 50 74 72 28 | 26 6d 65 73 73 61 67 65 |aramPtr(|&message|
|00003450| 2c 20 27 49 44 20 20 27 | 2c 20 74 79 70 65 53 68 |, 'ID '|, typeSh|
|00003460| 6f 72 74 49 6e 74 65 67 | 65 72 2c 20 26 61 63 74 |ortInteg|er, &act|
|00003470| 75 61 6c 4d 73 67 54 79 | 70 65 2c 20 26 6e 65 77 |ualMsgTy|pe, &new|
|00003480| 49 44 2c 20 73 69 7a 65 | 6f 66 28 6e 65 77 49 44 |ID, size|of(newID|
|00003490| 29 2c 20 26 73 69 7a 65 | 29 29 3b 0d 09 54 48 52 |), &size|));..THR|
|000034a0| 4f 57 49 46 4f 53 45 52 | 52 28 41 45 47 65 74 50 |OWIFOSER|R(AEGetP|
|000034b0| 61 72 61 6d 50 74 72 28 | 26 6d 65 73 73 61 67 65 |aramPtr(|&message|
|000034c0| 2c 20 27 4e 41 4d 45 27 | 2c 20 74 79 70 65 43 68 |, 'NAME'|, typeCh|
|000034d0| 61 72 2c 20 26 61 63 74 | 75 61 6c 4d 73 67 54 79 |ar, &act|ualMsgTy|
|000034e0| 70 65 2c 20 26 6e 61 6d | 65 5b 31 5d 2c 20 73 69 |pe, &nam|e[1], si|
|000034f0| 7a 65 6f 66 28 6e 61 6d | 65 29 20 2d 20 31 2c 20 |zeof(nam|e) - 1, |
|00003500| 26 73 69 7a 65 29 29 3b | 0d 09 6e 61 6d 65 2e 4c |&size));|..name.L|
|00003510| 65 6e 67 74 68 28 29 20 | 3d 20 28 63 68 61 72 29 |ength() |= (char)|
|00003520| 20 73 69 7a 65 3b 0d 0d | 09 73 68 6f 72 74 20 63 | size;..|.short c|
|00003530| 75 72 52 73 72 63 46 69 | 6c 65 20 3d 20 55 53 45 |urRsrcFi|le = USE|
|00003540| 52 45 53 46 49 4c 45 28 | 67 41 70 70 6c 69 63 61 |RESFILE(|gApplica|
|00003550| 74 69 6f 6e 52 65 66 4e | 75 6d 29 3b 0d 09 42 6f |tionRefN|um);..Bo|
|00003560| 6f 6c 65 61 6e 20 63 75 | 72 52 65 73 4c 6f 61 64 |olean cu|rResLoad|
|00003570| 20 3d 20 4c 4d 47 65 74 | 52 65 73 4c 6f 61 64 28 | = LMGet|ResLoad(|
|00003580| 29 3b 0d 09 53 65 74 52 | 65 73 4c 6f 61 64 28 46 |);..SetR|esLoad(F|
|00003590| 41 4c 53 45 29 3b 0d 09 | 48 61 6e 64 6c 65 20 72 |ALSE);..|Handle r|
|000035a0| 73 72 63 20 3d 20 47 65 | 74 31 52 65 73 6f 75 72 |src = Ge|t1Resour|
|000035b0| 63 65 28 74 79 70 65 2c | 20 6f 6c 64 49 44 29 3b |ce(type,| oldID);|
|000035c0| 0d 09 65 72 72 6f 72 20 | 3d 20 52 65 73 45 72 72 |..error |= ResErr|
|000035d0| 6f 72 28 29 3b 0d 09 53 | 65 74 52 65 73 4c 6f 61 |or();..S|etResLoa|
|000035e0| 64 28 63 75 72 52 65 73 | 4c 6f 61 64 29 3b 0d 09 |d(curRes|Load);..|
|000035f0| 69 66 20 28 65 72 72 6f | 72 20 3d 3d 20 6e 6f 45 |if (erro|r == noE|
|00003600| 72 72 29 0d 09 7b 0d 09 | 09 53 65 74 52 65 73 49 |rr)..{..|.SetResI|
|00003610| 6e 66 6f 28 72 73 72 63 | 2c 20 6e 65 77 49 44 2c |nfo(rsrc|, newID,|
|00003620| 20 6e 61 6d 65 29 3b 0d | 09 09 65 72 72 6f 72 20 | name);.|..error |
|00003630| 3d 20 52 65 73 45 72 72 | 6f 72 28 29 3b 0d 09 7d |= ResErr|or();..}|
|00003640| 0d 09 55 53 45 52 45 53 | 46 49 4c 45 28 63 75 72 |..USERES|FILE(cur|
|00003650| 52 73 72 63 46 69 6c 65 | 29 3b 0d 09 54 48 52 4f |RsrcFile|);..THRO|
|00003660| 57 49 46 4f 53 45 52 52 | 28 41 45 50 75 74 50 61 |WIFOSERR|(AEPutPa|
|00003670| 72 61 6d 50 74 72 28 26 | 72 65 70 6c 79 2c 20 6b |ramPtr(&|reply, k|
|00003680| 65 79 45 72 72 6f 72 4e | 75 6d 62 65 72 2c 20 74 |eyErrorN|umber, t|
|00003690| 79 70 65 53 68 6f 72 74 | 49 6e 74 65 67 65 72 2c |ypeShort|Integer,|
|000036a0| 20 26 65 72 72 6f 72 2c | 20 73 69 7a 65 6f 66 28 | &error,| sizeof(|
|000036b0| 65 72 72 6f 72 29 29 29 | 3b 0d 7d 0d 0d 23 65 6e |error)))|;.}..#en|
|000036c0| 64 69 66 0d 0d 0d 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |dif...//|////////|
|000036d0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000036e0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000036f0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00003700| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00003710| 2f 2f 2f 2f 0d 0d 23 70 | 72 61 67 6d 61 20 73 65 |////..#p|ragma se|
|00003720| 67 6d 65 6e 74 20 41 49 | 6e 69 74 0d 0d 76 6f 69 |gment AI|nit..voi|
|00003730| 64 20 52 65 67 69 73 74 | 65 72 54 41 64 4c 69 62 |d Regist|erTAdLib|
|00003740| 4c 69 6e 6b 28 29 3b 09 | 09 2f 2f 20 66 75 6e 63 |Link();.|.// func|
|00003750| 74 69 6f 6e 20 70 72 6f | 74 6f 74 79 70 65 0d 0d |tion pro|totype..|
|00003760| 76 6f 69 64 20 52 65 67 | 69 73 74 65 72 54 41 64 |void Reg|isterTAd|
|00003770| 4c 69 62 4c 69 6e 6b 28 | 29 0d 7b 0d 23 69 66 20 |LibLink(|).{.#if |
|00003780| 71 4d 61 63 41 70 70 56 | 65 72 73 69 6f 6e 20 3d |qMacAppV|ersion =|
|00003790| 3d 20 33 30 0d 09 6e 65 | 77 20 54 41 64 4c 69 62 |= 30..ne|w TAdLib|
|000037a0| 4c 69 6e 6b 3b 0d 23 65 | 6c 73 65 0d 09 4d 41 5f |Link;.#e|lse..MA_|
|000037b0| 52 45 47 49 53 54 45 52 | 5f 43 4c 41 53 53 28 54 |REGISTER|_CLASS(T|
|000037c0| 41 64 4c 69 62 4c 69 6e | 6b 29 3b 0d 23 65 6e 64 |AdLibLin|k);.#end|
|000037d0| 69 66 0d 7d 00 00 00 00 | 00 00 00 00 00 00 00 00 |if.}....|........|
|000037e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000037f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003800| 00 00 01 00 00 00 01 7c | 00 00 00 7c 00 00 00 5e |.......||...|...^|
|00003810| 74 a5 55 7a 5b da 5b 03 | 67 2e 4a 45 67 2a 42 01 |t.Uz[.[.|g.JEg*B.|
|00003820| f6 2c 20 01 20 18 2e 02 | 48 c5 2f 05 33 4c 01 f3 |., . ...|H./.3L..|
|00003830| 0d 55 41 64 4c 69 62 4c | 69 6e 6b 2e 63 70 69 6f |.UAdLibL|ink.cpio|
|00003840| 6e 73 74 79 2e 68 77 73 | 65 77 73 63 65 73 78 6c |nsty.hws|ewscesxl|
|00003850| 02 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|00003860| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003870| 00 00 b1 75 e9 ea 00 00 | 00 00 00 00 01 da 50 01 |...u....|......P.|
|00003880| 09 72 57 9f 50 01 24 72 | 57 79 57 9f 50 01 08 92 |.rW.P.$r|WyW.P...|
|00003890| 9d 68 82 01 66 5c 57 79 | 46 f1 57 9f 46 47 02 bc |.h..f\Wy|F.W.FG..|
|000038a0| 87 6f 04 b9 bb 61 01 d0 | 6e 9f bc 72 57 79 50 49 |.o...a..|n..rWyPI|
|000038b0| 47 57 9f 50 49 f1 02 be | 86 6f 04 61 bb b9 02 d0 |GW.PI...|.o.a....|
|000038c0| 6e ff ea bc b6 01 3d 6e | 9f 79 02 3d 6e ff ea cd |n.....=n|.y.=n...|
|000038d0| 3a 59 4d b2 79 02 20 d9 | 20 d9 73 02 10 c0 ff dc |:YM.y. .| .s.....|
|000038e0| 20 09 01 ff cc 5c 24 20 | 02 30 92 37 94 7f d7 4d | ....\$ |.0.7...M|
|000038f0| 5b 86 01 0c 05 59 5b 20 | 06 20 21 47 3c a1 68 4f |[....Y[ |. !G<.hO|
|00003900| 00 00 00 1e 00 50 00 20 | 02 55 02 28 00 50 00 20 |.....P. |.U.(.P. |
|00003910| 02 55 02 28 00 00 00 00 | 00 00 00 00 00 00 00 00 |.U.(....|........|
|00003920| 00 00 00 00 00 48 00 09 | 4d 6f 6e 61 63 6f 00 00 |.....H..|Monaco..|
|00003930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003940| 00 00 00 00 00 00 00 00 | 00 03 00 02 01 2a 00 27 |........|.....*.'|
|00003950| 02 82 01 f9 01 2a 00 27 | 02 82 01 f9 af f0 49 d1 |.....*.'|......I.|
|00003960| 00 00 36 a3 00 00 36 a6 | 00 00 34 fd 01 00 00 00 |..6...6.|..4.....|
|00003970| 00 02 00 00 00 00 00 04 | 00 01 00 01 00 00 01 00 |........|........|
|00003980| 00 00 01 7c 00 00 00 7c | 00 00 00 5e 02 61 84 e8 |...|...||...^.a..|
|00003990| 23 a0 00 00 00 1c 00 5e | 00 01 4d 50 53 52 00 02 |#......^|..MPSR..|
|000039a0| 00 12 4d 57 42 42 00 00 | 00 36 03 f0 ff ff 00 00 |..MWBB..|.6......|
|000039b0| 00 00 00 00 00 00 03 ed | ff ff 00 00 00 22 00 00 |........|....."..|
|000039c0| 00 00 03 ef ff ff 00 00 | 00 6e 00 00 00 00 03 f0 |........|.n......|
|000039d0| ff ff 00 00 00 74 00 00 | 00 00 00 00 00 00 00 00 |.....t..|........|
|000039e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+